Sunday, December 31, 2017

Explain System.out.println();


# out is a static variable present in a system class hence we can access by using class name System but whenever we are writing static import it is not required to use class name and we can access out directly.

import static java.lang.System.out;
class Test{

public static void main (String args[])
{
out.println("Hello");
out.println("Hi");

}

}




No comments:

Post a Comment