In C++ it's simple. Just use cin. But I'm trying to get an integer entered at the keyboard and store it in the age variable. Here is what I got but it's not working:

public static void main()
{

int age = 0;

System.out.println("Enter your age: ");
age = System.in;

System.out.println("Your age is " + age);
}