直接写就是了,例如;
class1 a=new class1(
                     new class2(
                     new class3()));

解决方案 »

  1.   

    直接写就是了,例如;
    class1 a=new class1(
                         new class2(
                         new class3()));
      

  2.   

    java默认自动换行功能,只要你不把变量或类型名之类拆分。
      

  3.   

    字串呢?比如String str = "aaa rere sdfsdf
     werwer giorewrwer sdfewrwer sdf";会出错???
      

  4.   

    String str = "aaa rere sdfsdf"
    +"werwer giorewrwer sdfewrwer sdf";