Write a single statement that will print the message “first is ” followed by the value of first, and then a space, followed by “second = “, followed by the value of second.
LANGUAGE: Java
CHALLENGE:
Write a single statement that will print the message “first is ” followed by the value of first, and then a space, followed by “second = “, followed by the value of second. Print everything on one line and go to a new line after printing. Assume that first has already been declared as a double and that second has been declared as an int. Assume also that the variables have already been given values.
SOLUTION:
System.out.println("first is " + first + " second = " + second);