public class DDD {
{
Scanner scn = new Scanner(System.in);
int month = scn.nextlnt();
if (month == 1)
System.out.println("31");
else if (month == 2)
System.out.println("28");
else if (month == 3)
System.out.println("30");
else if (month == 4)
System.out.println("31");
else if (month == 5)
System.out.println("30");
else if (month == 6)
System.out.println("31");
else if (month == 7)
System.out.println("30");
else if (month == 8)
System.out.println("31");
else if (month == 9)
System.out.println("30");
else if (month == 10)
System.out.println("31");
else if (month == 11)
System.out.println("30");
else if (month == 12)
System.out.println("31");
}
}
에러는 Scanner cannot be resolved to a type 이거 두개뜸
그 오류 그대로 구글링하면 나옵니다만
맞아 그 오류 그대로 복사해서 붙여넣으면 다 나와 괜히 구글신이 아님
영어 잘 모르면 한국어 웹만 보기로 바꿔서 보면됨
import java.util.Scanner;