Answer Posted / adikeanand@gmail.com
We know that println() method is available in PrintStream class of java.io package.To call any method of a class in java we required object of that class if the method is not static.we know println() is not static,so we required object of PrintStream class object.'System' is class in java and 'out' is static field in 'System' class.In java all static methods and static fields are accessed with class name,so 'out' is static field we access lke System.out that returns the object of PrintStream class with that PrintStream class object we can call methods of PrintStream class.Hence,we call like System.out.println(" "); when we execute this instruction we get one blank space after executing contol goes to next line.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is the difference between collection and stream?
Is lambda expression an object?
What are the advantages of java 8’s date and time api over old date api and joda time api?
What is Map,List,hashtable,ArrayList and difference between them??
Is java installed on windows 10?
Can I have multiple main methods in the same class?
Why is javac not recognized?
Is jar an executable?
What is entitymanager in java?
What does public static void main(string[]) mean?
How do I install java on windows?
I have deployed a .war file in my application server comprising of struts and hibernate.If i want to change the "dialect" property of hibernate cfg file how can i change(I have only .war file)... Thanks in advance
What's the difference between authentication and authorization? : java security
What is a singleton in java?
What is class path in java?