欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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;	
		} 
		
		}
	}

}
相关标签: java菜鸟疑问