请教:System.out.println和printInt这两个打印的有什么不同?

解决方案 »

  1.   

    像://....
    j=rand.nextInt(100)+1;
    k=rand.nectInt(100)+1;
    i=j+k;printInt("j+k",i);
      

  2.   

    在你当前的class或者import的class里面找~~
      

  3.   

    你是不是在某本书上看到的,
    那可能是作者为书写省事,
    自己编写的一个方法,
    java中好像没有这么个法.
      

  4.   

    j=rand.nextInt(100)+1;
    k=rand.nectInt(100)+1;
    i=j+k;printInt("j+k",i);
    ============================
    从上面的代码来看,printInt 方法不像是 JDK 内置的方法,可能是自己实现的一个静态方法。你可以去找找这段代码的其他地方可能会有这个方法的实现。
      

  5.   

    import com.bruceeckel.simpletest.*;public class BreakAndContinue {
      static Test monitor = new Test();
      public static void main(String[] args) {
        for(int i = 0; i < 100; i++) {
          if(i == 74) break; // Out of for loop
          if(i % 9 != 0) continue; // Next iteration
          System.out.println(i);
        }
        int i = 0;
        // An "infinite loop":
        while(true) {
          i++;
          int j = i * 27;
          if(j == 1269) break; // Out of loop
          if(i % 10 != 0) continue; // Top of loop
          System.out.println(i);
        }
        monitor.expect(new String[] {
          "0",
          "9",
          "18",
          "27",
          "36",
          "45",
          "54",
          "63",
          "72",
          "10",
          "20",
          "30",
          "40"
        });
      }
    } ///:~像这个程序,其前面的那个类是不是作者写的?
    还有最后的monitor.expect(new String[] {}和println有什么区别?
      

  6.   

    monitor.expect(String[]);
    是个方法!
      

  7.   

    问楼上:难道println 不是个方法么?