其实我是想用这个程序判断象限问题的import java.util.*;
public class xiangxian 
{
public static void main(String[] args)
{
float x,y;
Scanner s1 = new Scanner(System.in);
Scanner s2 = new Scanner(System.in);
System.out.println("请输入X的值:");
                x = s1.nextFloat();
System.out.println("请输入Y的值:");
y = s2.nextFloat();
if(x>0&&y>0)
{
System.out.println("第一象限");
}
if(x<0&&y>0)
{
System.out.println("第二象限");
}
if(x<0&&y<0)
{
System.out.print("第三象限");
}
if(x>0&&y<0)
{
System.out.println("第四象限");
}
if(x==0)
{
System.out.println("在Y轴上");
}
if(y==0)
{
System.out.println("在X轴上");
}
}
}出错提示是:
java.lang.NoSuchMethodError: main
Exception in thread "main"

解决方案 »

  1.   

    难道是myeclipse的问题,可是我有不知道是哪里出了问题,你遇到过这样的问题吗
      

  2.   

    能运行啊,在MyEclipse上,LZ是不是构建的项目错了。
      

  3.   

    程序本身没有问题的,可能是myeclipse的问题吧,
      

  4.   

    有时候eclipse和myeclipse或者其他的软件都有莫名其妙的问题,只能换其他的试试了。