i am new please guide me how can i take input from user in java. i did java from lot of time ago now i am starting learn again i did learn take input from user by this, there is a statement to write input from user
first we initialize variable like :
int num;
that we learn to take input like this:
num=MyInput.readInt();
all work in My class: class Circle
what is wrong there i don't understand what is my mistake to take input from user i have search from google but still i could not find please help me
Help me to resolve this error
When i compile bellow program in JDK1.7 there is error: Can not find symbol num=MyInput.readInt();
i don't understand what is this and why i am getting this error help me i am waiting for your response
This is my Program:
public class Circle
{
public static void main(String[] args)throws Exception
{
int num;
System.out.println("Enter a number between 10 and 20:-");
num=MyInput.readInt();
if(num>10 && num<20)
{System.out.println("You have entered a valid number");}
else
{System.out.println("The number you entered is not a valid number");}
}
}