Monday, October 30, 2023
Why Java and Spring Developers Should Learn RESTful Web Services and Microservices
Monday, October 23, 2023
15 Example of print() and println() methods in Java
Hello guys, if you have learned Java in early 2000 then there is good chance that you must have written your first Java code using System.out.println(). For a long time, I have no idea what that mean but I alway use it to print messages on console. When I started working in Java and preparing for Java certification then I come to know that System is a class and out is an object of PrintStream which has println() method. That was a revelation for me. I also found that Java provides a powerful set of I/O classes for handling various input and output operations. Among these, the PrintStream class stands out as a versatile tool for writing formatted text to output streams. The print(), printf() and println() methods within the PrintStream class, as well as System.out.println(), are particularly useful for printing different types of data to the console or other output destinations.