Question: What would the following statements, when used in a Java program, display on the screen? int age; age = 20; System.out.println (My age is); System.out.println(age);

What would the following statements, when used in a Java program, display on the screen?

int age;
age = 20;
System.out.println ("My age is");
System.out.println(age);

Step by Step Solution

3.36 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The most basic way to display a string in a Java program is with the System out println sta... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java An Introduction to Problem Solving and Progra Questions!