java multiple printing code example Example: printing multiple variables in java System.out.printf("First Name: %s\nLast Name: %s",firstname, lastname);