System.out.println("hello");
System.out.print("world, I'm not happy.");

解决方案 »

  1.   

    why ?Can I help you?
      

  2.   

      System.out.println(“你好”)。
      System.out.print(“世界,我很不高兴。”)。
      

  3.   

    人家说回上给分,回一个:
    hello
    world,I'm not happy.
      

  4.   

    第一个输出的结果是: hello
    然后光标会处于下一行。也就是println是一行一行的输出的
    第二个输出的结果是: world, I'm not happy.
    但是光标会处于句号的后面。也就是print是不换行输出,紧接着后面输出。
      

  5.   

    hello
    world,i am not happy
      

  6.   


    呵呵,翻译了,为什么不把System.out.println也翻译了,哈哈~~
      

  7.   

    hello
    world, I'm not happy.
      

  8.   


    System.out.println("hello");
    System.out.print("i,m jvm, please happy!");
    呵呵,jvm是上帝
      

  9.   

     private BufferedWriter textOut;
     private OutputStreamWriter charOut;public void println(String x) {
    synchronized (this) {
        print(x);
        newLine();
    }
        }
    public void print(String s) {
    if (s == null) {
        s = "null";
    }
    write(s);
        }    private void write(String s) {
    try {
        synchronized (this) {
    ensureOpen();
    textOut.write(s);
    textOut.flushBuffer();
    charOut.flushBuffer();
    if (autoFlush && (s.indexOf('\n') >= 0))
        out.flush();
        }
    }
    catch (InterruptedIOException x) {
        Thread.currentThread().interrupt();
    }
    catch (IOException x) {
        trouble = true;
    }
        }
      

  10.   

    hello 
    world, I'm not happy.
      

  11.   

    呵呵,这个我会。可以这么理解:system.out.println(string) == system.out.print(string+'\n');
      

  12.   

    不开心的很正常  但只能允许自己最多难过three day