Time is really the fairest thing, as long as we can make good use of it, it can bring us what we want. Java has been learning for a week, and the knowledge of Java fundamentals has gone further, and interest in Java has become increasingly strong. To implement a Java program, there are three main steps: The first step is to write the Java source code, the second step is to compile the source code, the third step is to run the Java program. The Java source code must be compiled before it can be parsed by the JVM (the Java Virtual machine). Java source code files are actually a generic text file with the suffix. Java, which can be written in Notepad or in the (Integrated development environment).
For a Java source program, its analysis is as follows:
1. The sign/*//Middle statement is the comment of the program, the multiline comment starts with/*, ends with */, the single line comment begins with//, the end of the line ends automatically, and the Java document Comment uses/** */.
2. The keyword class is the definition of the declaring class and helps the compiler understand that he is a declaration of a class.
3. The entire class and all its members are defined between a pair of curly braces {}.
4. The program starts with the main () method, which is the starting point for all Java applications. (equivalent to the main function in the C language)
5. The keyword public is an access specifier that controls the visibility and scope of action of a class member.
6. The keyword static allows the main () method to be called without creating a class.
7. The keyword void tells the compiler that the main () method does not put back any values when it executes.
8.args[] is an array of type string, and the PRINTFLN () method displays the string passed to it as a parameter by System.out.
The Java Virtual machine JVM is the biggest feature of the Java language, and everything has two sides, and the JVM is no exception. The JVM is a virtual computing system that can run Java bytecode. It has an interpreter component that enables the communication between Java bytecode and computer operating systems. It also includes a set of registers, a stack, a garbage-collected heap, and a storage method domain. The JVM masks information related to the operating system platform so that Java programs can run without modification on multiple platforms simply by generating bytecode that runs on a Java virtual machine. This is also the biggest feature of Java cross-platform, that is, a write, run everywhere. When the JVM executes the bytecode, it actually eventually interprets the bytecode as a machine instruction execution on a specific platform. The instruction set for compiling the virtual machine is very similar to the instruction set of the compiled microprocessor. This is one of the most criticized areas of Java, and running on the JVM is certainly not running directly on the operating system quickly. So some people always say that Java does not run as fast as the C language.
The above is the basic knowledge of Java recently learned, there are variables involved in the declaration, data type, expression, operator problems, and so I will share with you next time.
2017-08-30
201671010127 2016-2017-2 Java Learning Week knot