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

Answers were Sorted based on User's Feedback



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

Answer / sooraj

It does nothing but print a 'space' and new line to console.

Is This Answer Correct ?    15 Yes 2 No

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

Answer / 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

More Java Related AllOther Interview Questions

Explain different way of using thread?

0 Answers  


For each of the following program segments,give a big zero analysis for the running time 1.For (i=0;i<m;i++) { // } 2.For (j=0;j<i;j++)

0 Answers   St. Pauls University,


What is orm in java?

0 Answers  


What is dependency injection in java?

0 Answers  


Can I use openjdk for commercial?

0 Answers  






What is the content of the Java 2 security policy file?

1 Answers  


What does public static void main(string[]) mean?

0 Answers  


can a program use more than one command-line argument?

0 Answers  


What is maven in java?

0 Answers  


Why bean class is used in java?

0 Answers  


What is the difference between java se and java ee?

0 Answers  


What is aop java?

0 Answers  


Categories