Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to print two variables in same line in java

// Let var1 be the first variable and var2 the second
System.out.print(var1 + " " + var2); // does not advance to next line

// Or alternatively
System.out.println(var1 + " " + var2); // prints and then advances to next line
Comment

PREVIOUS NEXT
Code Example
Java :: create date java 
Java :: java ModelMapper class 
Java :: getsupportactionbar activity 
Java :: loop through array java 
Java :: convert optional object to object java 
Java :: how to read a text file in java 
Java :: How to determine if a given binary tree is a binary search tree, in Java? 
Java :: mongoose collection name 
Java :: change button text when clicked android studio 
Java :: using buidfeatures to enable viewbinding 
Java :: java thread lambda 
Java :: map string list string in java 
Java :: java read first line of file 
Java :: how to read a string after an integer in java 
Java :: print two dimensional array java 
Java :: java scanner input float 
Java :: ripple effect textview android 
Java :: java first day of week 
Java :: get certain character from string java 
Java :: java localtime format 
Java :: region in android studio 
Java :: java for each 
Java :: como calcular a raiz quadrada em java 
Java :: how to convert string to boolean in java 
Java :: how to get width android 
Java :: android sharedpreferences 
Java :: java string to decimal 
Java :: how do i print text in java 
Java :: javafx tableview add data 
Java :: how to create relative layout in android studio 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =