We can access a method of a class simply using its referrence name
eg:CharStack stack1 = new CharStack()is the object instantiated
stack1.push() (or) CharStack.push() if method is static
But, why do we use two (.)dot operators in order to access println method
can't we just say System.println("hello")
The "out" object is of the PrintStream class .System class extends
Object class .System cannot be instantiated,does it mean it is a static class??To whom does PrintStream class belong to and why dont we use
PrintStream.println("hello") or just out.println("hello") as out is an object of class PrintStream.
Everyting is very confusing can anybody help me clear my doubts please
Thanks in advance!!!