import java.util.*;//load Java. Util class libraries all the classes
Public class InputNum
{public static void main (String [] args)
{int a=0;
Float b=0 f;
Double c=0 d;
System. Out. Println (" input from the keyboard an integer: ");
Scanner buf=new Scanner (System. In);
A=buf. Nextlnt ();//call nextInt () method, and read the number assigned to a
System. The out. Println (" you enter an integer is "+ a);
System. The out. Println (" input from the keyboard a single-precision floating-point number: ");
B=buf. NextFloat ();//call nextFloat () method, and read the number assigned to b
System. The out. Println (" you input single-precision floating-point number is "+ b);
System. The out. Println (" input from the keyboard a double-precision floating-point number: ");
C=buf. NextDouble ();//call nextDouble (), will read the number assigned to the c
System. The out. Println (" you input double-precision floating-point number is "+ c);
}
}
But every time will appear below the Javac situation
Ever bosses, help me to the novice to solve
CodePudding user response:
A=buf. Nextlnt ();//call nextInt () method, and read the number assigned to aIs nextInt right, your input is nextlnt, capital letter I , and lowercase letter l , like very much,
CodePudding user response:
Thank you I have already corrected, but the situation is still not changed or the above caseCodePudding user response: