selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 00:38:16
selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println

selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println
selection does not contain a main type的问题
import java.util.Scanner;
public class Population {
private String name;
private int population;
private double growthRate;
public void readInput()
{
Scanner keyboard = new Scanner(System.in);
System.out.println("what is the species' name ");
name = keyboard.nextLine();
System.out.print("what is the popution of lll");
population = keyboard.nextInt();
while (population < 0);
{
System.out.println("population can not be negatived");
System.out.print("Reenter population:");
population = keyboard.nextInt();
}
System.out.println("Enter growth rate:");
growthRate = keyboard.nextDouble();
}
public void writeOutput()
{
System.out.println("Name = " + name);
System.out.println("Population = " + population);
System.out.println("Goth rate = " + growthRate + "%");
}
}
Java文件也在src下面,为什么就是不能运行呢?写的其他程序就能,怎么解决啊,不要找什么更改目录的回答了

selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println
没有静态的main(String args[])方法,程序无法直接启动!
public static void main(String args[]){
Population p = new Population ();
p.readInput();
p.writeOutput();
}
以上代码加入到类里面;

my eclipse中出现The selection does not support run mode我新建了两个类,一个是父类,一个是子类,可子类不能运行 does not Does everyone play sports?A.plays B.don,t play C.does D.does not I ( )go to schoolA.do not B.am not C.does not D.is not 146. You’ve the ___ of working hard and being successful or of not working hard and being unsuccessful. A. selection B. choice C. alternative D. option selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println 选择填空 Your life is not very interesting,( )it A does B does not C is D is not At first she ( )like math,but now she ( ) A.didn't ,did B.does not ,does C.did not ,does D.didD.did not ,did does not feel ( ),does he?A.swwet B.boring C.well D.health David______any reading in the evening.A.did not do B.did c.does not do D.does Some people ___________ like documentary.选项A.does not B.is not C.do not D.are not Ask him ( ) come to our party tomorrow.A not B not to C does not D is not Ben,_____climb the tree.It it very dangerous.A:does not B:not C:do not D:is not She ( ) ang help.A.does not need to B.need not C.needs not .D.does not need 括号中填什么? 新概念英语2第三课选择理解The writer( )(a)does not like buying postcards (b)does not like receiving postcards(c)does not like writing postcards (d)does not like postcards Marry watches TV once a week,_____?A.does she B.does not she c.does not Marry D.do not sheMarry watches TV once a week,_____?A.does she B.does not she c.does not Marry D.do not she Susan is not very intelligent,__ work very hard.A)nor does she B)or does she C)either does she D)neither does she it does not matter