记录详情

Compile Error

/in/Main.java:25: error: variable s is already defined in method main(String[])
		Scanner s=new Scanner(System.in);//?Scanner????
		        ^
/in/Main.java:28: error: no suitable method found for printf(int)
			System.out.printf(i);
			          ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
/in/Main.java:30: error: cannot find symbol
			a=s.nextInt();
			^
  symbol:   variable a
  location: class Main
/in/Main.java:30: error: int cannot be dereferenced
			a=s.nextInt();
			   ^
/in/Main.java:33: error: int cannot be dereferenced
		s.close();//????
		 ^
5 errors

信息

递交者
类型
递交
题目
P1045 校内寻宝
语言
Java
递交时间
2024-06-17 16:12:26
评测时间
2024-06-17 16:12:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes