What Does System.out.println() Statement Mean? I Need Explanation Regarding This Statement.

6

6 Answers

Anonymous Profile
Anonymous answered
System --is a class which is present in java.lang package.

Out-- is a static field  present in system class which returns a PrintStream object.As out is a static field it can call directly with classname.

Println()-- is a method which present in PrintSream class which can call through the PrintStream object return by static field out present in System class to print a line to console.
Anonymous Profile
Anonymous answered
Println is the metho defined in penstream cls to send the that to the destination or print..
Out is the obj of prinstream cls defined  as static member of system cls.
Class printStream
{
string println();
}
class system
{
static printStream out=new printStream(obj of the outputstream cls);
}
why we should pass obj of outputstream cls as argument to printstream?
Because println method just know how to take data to the destination but don't know which is the destination.obj of outputstream cls contains the adress of the destination(console).
Anonymous Profile
Anonymous answered
Object.
This is a syntax of Java used to display a string on the console window or the computer screen.
If you execute:
System.out.println("Hello, world!"),
you will get:
Hello, world.
On the computer screen.

System is the object that represents the computer.
Out is a stream on that.
Print and Println are methods on that out stream.
Leave a comment Report
Vishva Kumara Profile
Vishva Kumara answered
println is the method from wich we can put a string on the out stream that is in the System object.
This is a syntax of Java used to display a string on the console window or the computer screen.
If you execute:
System.out.println("Hello, world!"),
you will get:
Hello, world.
on the computer screen.

System is the object that represents the computer.
Out is a stream on that.
Print and Println are methods on that out stream.
Anonymous Profile
Anonymous answered
System is actually a class, which, according to the Java 6 API, cannot be instantiated so I'm not sure if it's correct to say that it is an object.

Answer Question

Anonymous