Answer:
Following are the code to this question:
import java.util.*;//import package
public class Main//defining class Main
{
public static void main(String[] as)//defining main method
{
Scanner obx= new Scanner(System.in);//creating Scanner class Object
String name = obx.next();//input String value in name variable
int age = obx.nextInt();//input integer value in age variable
System.out.println("The age of " + name + " is " + age);//print value with message
}
}
Output:
Rohit
70
The age of Rohit is 70
Explanation:
The description of the given java code can be defined as follows: