Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

print two varaibles using one statement in java

// If you want to print two strings, just concatenate them
System.out.println("Name : " + namestring + "Surname : " + surnamestring);

// for non string variables, you have to use a little hack
System.out.println(int1 + " " + int2);
 
PREVIOUS NEXT
Tagged: #print #varaibles #statement #java
ADD COMMENT
Topic
Name
8+9 =