Skip to main content

Posts

Showing posts with the label java printf

system out println

System.out.println():-  System.out.println(“javaindore.blogspot.in”);   , will display message written in double quotes on the standard output device that is system screen or monitor. Here System is a java class, declared in lang package like java.lang.System, here java is main package and lang is a sub package. In java System class is declared as a public and final, due to public declaration everybody can happily access these class members but due to final declaration nobody can inherit this class or nobody can override System class methods. All the methods of System class are public and static so everyone can access all the methods using class name like classname.method. For example:   public static void exit (int)   is a method of System class then using  System. exit (0)   anyone can use. System class not provided public constructor so directly we cannot create object of System class. System class in java:-  ...