Java’s Print similarities to C

As we know that java is made by the C programming. The java has many common features to C language. While we wants to print in java we usually use the following code.
System.out.println(statement1);
or
System.out.print(statement2);
But there is also the feature of printf in java which we used to do in C programming:
Syntax:
//In C language
printf(“format_string”, comma_separated_list_of_expressions);

A Public Vs. Nonpublic Classes

Probably we used to declare the method and class as a public .
But the there is also the classes where there is no any public
or any private .
We can make two or many classes in a single class file.
* But when declaring numerous class the class file must contain
at least one public class whose class [...]

ToString() method

The toString() method is one of the feature of java. It is the method of class String which is imported default on JVM from java.lang.Object;

ToString() method is one of the display method.
When ever we tries to print the text from System.out.println(“Hello”); then it directly inherit from the