JAVA阅兵,把你们JAVA的开源项目发上来看看,以供元首检阅

解决方案 »

  1.   


    public static void main(String args[]) {
    String str = "2";
    System.out.println("--"+str + ' ' + "--");
    int a = 2+' ';
    System.out.println("--"+a+"--");
    }
    大家检阅一下,有什么区别
      

  2.   


    public class HelloWorld{
      public static void main(String [] args)
      {
         System.out.println("Hello LZ!");
      }
    }
      

  3.   


    public class Fantacy{
       public static void main(String args[]){
          hello();
       }   public static void hello(){
          hello();
       }
    }
      

  4.   


    public class Parade{
       public static void main(String args[]){
          helloComrades();
       }   public static void helloComrades(){
          System.out.println("Hello Comrades! You have worked hard!");
          helloPresident();
       }   public static void helloPresident(){
          System.out.println("Hello President! Serve the people!");
          helloComrades();
       }
    }输出:
    同志们好!同志们辛苦了!
    首长好!为人民服务!