0
How can I solve this?
public class Program { public static void main(String[] args) { //declare variables String name = "Howard"; /* declare the age int age = 42; */ //output values //System.out.println(name+" is "+age+" years old."); } }
2 Answers
+ 5
What you need to solve there? Do you aware of it?
I guess you need to execute output statement...! There 3 statements String declaration, then integer declaration with assignments, next a output statement which displays name with age are given but last 2 valid statements are commented so those won't get executed. You need to uncomment those required statements and see output..
/*
..
*/
Is multiline comment
// is a single line comment.
statements commented won't get executed...
0
Code well be like this
//declare the age
int age = 42;
//output values
System.out.println("name is " +name+" " +age+" years old.");
}
}