my age is 13 a variable 'a' contains a value 13, write a Java statement to print "My age is 13 years" (without quotes) on the screen. The illustration shows the desired output of the statement.
Answers
Answered by
2
Answer:
int a=13;
System.out.println("My age is" + a + "years");
Explanation:
Answered by
2
Question ?
Variable a contains a value 13. Write a java statement to print "My age is 13 years" without quotes on the screen.
Answer:-
Here is your program in java.
class Print
{
public static void main(String args[])
{
int a=13;
System.out.println("My age is "+a+" years. ");
}
}
Similar questions