// 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);