Java out.println() how is this possible?

前端 未结 9 1443
难免孤独
难免孤独 2020-12-08 13:42

I\'ve seen some code such as:

out.println(\"print something\");

I tried import java.lang.System;

but it\'s not working

9条回答
  •  臣服心动
    2020-12-08 13:52

    you can see this also in sockets ...

    PrintWriter out = new PrintWriter(socket.getOutputStream());
    
    out.println("hello");
    

提交回复
热议问题