English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

'system' is a class and 'println' is a method in that class, then what is "out"?

2006-12-11 06:00:27 · 5 answers · asked by sudheer m 1 in Computers & Internet Programming & Design

5 answers

Actually, it's a static instance of the class PrintStream.

2006-12-11 06:07:24 · answer #1 · answered by TankAnswer 4 · 0 0

In Java, the "out" in "System.out.println()" is a class, which was already discussed in a previous comment. This class resides in the "System" package and, to put it simply, represents an IO stream to your "System", which is interpreted as a stream to your monitor.

2006-12-11 09:47:03 · answer #2 · answered by Nathan 2 · 0 0

out is another object of the system object. so its a object within a object then println is a method of the out object.

2006-12-11 06:49:35 · answer #3 · answered by Anonymous · 0 0

It's called a "namespace". It doesn't do anything in and of itself, instead it encapsulates different output functions like println(). the "in" namespace would encapsulate writelin().

2006-12-11 06:05:13 · answer #4 · answered by manuelriliz 3 · 0 0

out refers to output. Not sure which language you are programming in, but out selects the STDOUT stream (prints to console). So system.in would then be the STDIN stream (keyboard input).

2006-12-11 06:03:43 · answer #5 · answered by csanon 6 · 0 0

fedest.com, questions and answers