用.txt文件调试下面的代码
public class people
{
       String head,foot,head;
       void speak(String s)
        {System.out.println(s);}
}    public class one
    {
       public static void main(String args[])
             {people wu= new people();}
       wu.speak("good");
    }  
怎样才能在一个文件中调试有两个类的程序啊??我这段程序的文件名怎么起才能运行起来啊,我起过one.java和people.java都不行啊,请大家帮忙啊,另外问一下现在搞java都用什么工具啊?有实用点的推荐一下啊!

解决方案 »

  1.   

    one.java
    public class people
    改为
     class people
      

  2.   

    一个.JAVA的文件最多只能包含一个PUBLIC的类。而一个这个的main函数都包含在PUBLIC类里面
      

  3.   

    推荐Eclipse,不过耗内存。如果不做大型开发
    Ultraedit + jdk就可以了。
      

  4.   

    Eclipse挺好用,不过内存最好在512以上,推荐1G的内存加上P4 2.4G以上的CPU来开发
      

  5.   

    public static void main(String args[]){
           people wu= new people();
           wu.speak("good");
    }
      

  6.   

    jcreator先从简单的工具开始运用,他们推荐的估计现在还不适合你。
      

  7.   

    class people
    {
           String head,foot,head;
           void speak(String s)
            {System.out.println(s);}
    }
    请教一下,这个类的私有成员head,foot,head有什么用呢?
      

  8.   

    一个.JAVA的文件最多只能包含一个PUBLIC的类