Sytem.out.println(" "); this code what mean

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


Please Help Members By Posting Answers For Below Questions

What are the risks in java security? : java security

543


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

1515


How do I run a java project in netbeans?

562


What do you understand by casting in java language? What are the types of casting?

519


What is the meaning of loosely coupled in java?

540






Topic- looping,function overloading,nesting ,polymorphism. Aim - to write a function with a name buzz-buds,that will check whether the given numbers are buddies or not on the basis of no. of parameters passed during function calling.

1713


What is the meaning of the words public, static and void?

545


What is stateless in java?

579


Does jvm maintain a cache by itself? Does the jvm allocate objects in heap? Is this the os heap or the heap maintained by the jvm? Why

556


Why is javac not recognized?

570


What is war file in java?

649


What is static class in java?

583


Where is java installed?

558


explain how java se 8 data and time api solves issues of old java date api?

636


What is tight coupling in java?

588