java菜鸟疑问1:为什么我的代码总出现cannot be resolved or is not a field这种问题
程序员文章站
2022-04-28 07:56:36
...
如代码所示,求大佬解答这段代码的问题和解决方案是什么。
import java.util.Scanner;
public class RS {
private static Object System;
public static void main(String[] args) {
int a,b,x;
Scanner in=new Scanner(System.in);
x=in.nextInt();
if(x>=11&&x<=59)
{
a=x/10;
b=x%10;
switch(a)
{
case 1:
System.out.println("Unreadable");
break;
case 2:
System.out.println("Barely readable, occasional words distinguishable");
break;
case 3:
System.out.println("Readable with considerable difficulty");
break;
case 4:
System.out.println("Readable with practically no difficulty");
break;
case 5:
System.out.println("Perfectly readable");
break;
}
switch(b)
{
case 1:
System.out.println("Faint signals, barely perceptible");
break;
case 2:
System.out.println("Very weak signals");
break;
case 3:
System.out.println("Weak signals");
break;
case 4:
System.out.println("Fair signals");
break;
case 5:
System.out.println("Fairly good signals");
break;
case 6:
System.out.println("Good signals");
break;
case 7:
System.out.println("Moderately strong signals");
break;
case 8:
System.out.println("Strong signals");
break;
case 9:
System.out.println("Extremely strong signals");
break;
}
}
}
}
上一篇: 如何通过jQuery添加新的内容
下一篇: 微信测试号-添加多客服问题