0

"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."

what I have so far is..

double first = 1;
int second = 3;
System.out.println("first is 1 second = 3" + "\n");

1 Answers1

0

Use + operator for contacting the variable. double first = 1; int second = 3; System.out.println("first is "+first+ " second = " +second+"\n");