System.out.println("Hello") - Full Explanation

 System.out.println("Hi Java"); this is used for printing value on console. in the below example System is a class that is present in java.lang package. out is a static variable in the System class that the reason we can access out variable by dot operator. println is a method that is defined in printStream class.

For Example:

System: System in class present in java.lang package

out: is a static variable present in System class

println : this is a method present in PrintStream class.

class System{
     static PrintStream out;
       .....
}   

Comments

Popular posts from this blog

public static void main(String [] args) - Full Explanation

Coding Problem 3 - Weather Observation Station 7 [HackerRank - SQL]

Date Range Picker In Angular 10