0

Here are two variables:

    int number1 = 26;
    int number2 = 876;

How could i print out this sentence: "Value of number1 is: 26 and value of number2 is: 876." , using only one print() function?

I could do this with 3 print() function :

    System.out.print("Value of number1: " + number1);
    System.out.print(" and value of number2: " + number2);
    System.out.print(".");

Altough i would like to use only 1 print() to do all of the above if it is possible

Max
  • 21
  • 5

0 Answers0