How System.out.println() works in Java

🖥️ Understanding System.out.println() in Java Ever wondered what really happens behind the simple line 👉 System.out.println("Hello, World!"); ? Here’s the breakdown 👇 🔹 System → printStream object (out) is stored in system class as a static property. To call the static property we need class name that is System. 🔹 out → Out is a object created for printStream class to call the printStream methods. 🔹 println() → print(), println() are the methods in printStream class. In this out object is used to call the printStream methods. So, when we write: ➜System.out.println("Java is awesome!"); Java actually reads it as: ➜“Use the System class → access its ‘out’ object → call the ‘println()’ method to print text on the console.” #Java #SystemOutPrintln #LearnJava #JavaProgramming #ProgrammingBasics #Codegnan Thanks to my mentor Anand Kumar Buddarapu Saketh Kallepu Uppugundla Sairam

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories