-4
package javaapplication97;
import java.util.Scanner;
public class JavaApplication97 {
public static void main(String[] args) {
System.out.println("Enter a number: ");
Scanner s1 = new Scanner(System.in);
if (s1.hasNextInt())
System.out.println("This is an int");
}
}
의미 생각하십니까? –
'for' 및'while' 루프에 대해 알고 있습니까? [-> while 문 및 do-while 문] (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/while.html) 및 [for> for 문] (http : // docs .oracle.com/javase/tutorial/java/nutsandbolts/for.html) – Smit
올바르게 형식을 지정하십시오. – NINCOMPOOP