Hi everyone, This question may be too simple but I really want to know because a lot of books would be read that the first topic (getting start) as follows: System.out.println("Hello Javaranch!!! How're you ?"); What's that ? I mean System.out.println("Hello Javaranch!!! How're you?"); // objectname.methodname(); Is it correct?
The System class is included by default in all your executing programs as it is apart of java.lang package. The System class contains several class fields such as out, in and err which allow various types of output and input operations such as the overloaded println() method. Check here System Class and then post more questions if you have any. [ May 23, 2002: Message edited by: Rodney Woodruff ]
More accurately in, out and err are static members of the System class, where err and out are objects of type PrintStream, and in is an InputStream object. Hence it is essentially objName.methodName(), where objects are static members of System class, so you do not need an instance of System class to access them. HTH, - Manish