Java is an object-oriented programming language. It not only absorbs the various advantages of the C language, but also abandons the difficult-to-understand concepts such as multiple inheritance and pointers in C. Therefore, the Java language has two characteristics: powerful functions and simple and easy to use. . As a representative of static object-oriented programming languages, Java language perfectly implements object-oriented theory and allows programmers to perform complex programming with an elegant way of thinking.
The output statement is the simplest and most commonly used statement in Java:
public class Test1 { public static void main(String[] args) { System.out.println("hello java"); } }
The file name is written after public class, here What you write must be consistent with the file name. The second line is the main method, which is the entry point for a program to run (I don’t know why the main method is written like this, just remember it);
The third The line is the output statement, println means line break display, print means no line break after display, write the words and expressions you want to output in "".
The above is the detailed content of What is the java output statement?. For more information, please follow other related articles on the PHP Chinese website!