2nd Article-java Foundation
every single sentence : In any field, even in small things, to make every day worth
Beginner's experience : in the process of learning, mistakes are very valuable, it is a "wealth", but also a "value"
( Author: jeep/711) [Java Notes | time: 2017-03-24 | Java Basics]
Java Basics Review
In the last article, we finally mentioned two questions, and I believe the readers have exceeded the "task" in advance.
Following the author's thoughts, in-depth grasp the Java underlying operating mechanism
Java operating mechanism (heavy weight)
Java operating mechanism is the root of the entire Java system we must understand its underlying implementation details, I can enumerate the life common practice describe the reason
As we have just met a friend, how can we more accurately find the topic of chat?
At this point we need to understand each other's character, temper, hobbies and other characteristics
In turn, we know how to make friends, and we understand why we have to understand the Java underlying implementation mechanism,
Only by understanding the most basic characteristics of a thing, can we better "communicate" with each other.
What is a Java virtual machine? The JVM can be understood as a virtual computer system that can run Java bytecode
The Java Platform Java platform is a pure software platform that includes:
Java Virtual machine, JAVAAPI Interface (programming Interface), executable file is. Class (byte code)
Java applications are not run directly on the operating system and need to deploy different JVMs (Java virtual machines) on different operating systems
Java Compilation Environment -Java source code (suffix. java file) -Java compiler -Java byte code (suffix. calls file) -bytecode > local or network -Java Platform Runtime Environment -Java Virtual Machine -class loader byte code verification - <--Java class Library
Java Interpreter -Instant Compilerand therun-time system -Operating System -underlying hardware
Read more, understand more, master the principles of operation, share your understanding of the Java operating mechanism with your friends
Deep anatomy of the first Helloword program
The author first divides the code into three steps, its interpretation meaning, split the purpose is to let the reader understand the Java language structure, the final form of the Java Language Foundation program
/**2. * ** First Helloword program keyword **3. * public modifier public 4. * class class define name of class 5. * helloword class custom 6. * static static 7. * void No return 8. * main method name main function Program Entry (parameter) 9. *10. **/11.12./**13. *14. * 1. Represents a class 15 declaration. The * class can be simply understood as a container, about "class", to explain its meaning in detail later 16. *17. **/18. public class helloword{19.20.} 21.22./**23. *24. * 2. Declares that a method body 25. * class is equivalent to a container holding a method body 26. * 27. **/28. public static void main (String[] args) {29.30.} 31.32./**33. *34. * 3. Represents the function execution statement the 35. * method body also holds the execution statement 36. *37. **/38. system.out.println ("Helloword"); 39.40.41. /**42. * 43. * finally combine them together 44. **/45. //keyword: public modifier //class class: Declares a class's keyword //class name: Helloword, is the declaration of a class 46. public class helloword{47. // public public, Static, void no return value type main Main method, string[] string array args parameter name 48. public static void Main (String[] args) {49. //function execution statement 50. system.out.println ("Helloword"); 51. }52.}
About Java language annotations
1. Single-line comment,//After all characters to the end of the bank will be ignored by the compiler;
2. All characters in a multiline comment,/*/* are ignored by the compiler
3. Documentation comments, all characters in/* /between will be ignored by the compiler, Java Special (for generating documents);
About the Java language naming conventions
It can be simply understood as a name in a Java program to enhance the readability of the customization. For example: Class name, method name, variable name, and so on.
(1) consists of letters, numbers, underscores, and $, and cannot begin with a number
(2) Case sensitive
(3) Do not use keywords and reserved words in Java
(4) You cannot use the class name in the Java API as your own.
About writing the Java language Specification (following its specifications)
1.JAVA languages are strictly case sensitive
2. A Java source file can define multiple Java classes, but only one of the classes is defined as public (common) class
3. If the source file contains a public class file, the source file name must be the same as the public class name
4. When a source file contains n Java classes, an n-byte code file is generated after compilation, that is, each class generates a separate class file, and the byte code file name and the corresponding class name are the same
5. Only one class can be defined in a source file, and different classes are defined using different source files
6. Define the individually defined classes in each source file as public, keeping the main file name of the Java source file consistent with the class name in the source file
Beginner Basic Difficulty: ★★★★ Thank you for your reading welcome your message and suggestions
Sina official Weibo: @ China hotspot Video Media
GitHub Blog: Https://github.com/jeep711/jeep711.github.io
Blog garden:http://www.cnblogs.com/jeep711/
w3c/blog:http://www.w3cschool.cn/jeep711blog/
csdn/blog:http://blog.csdn.net/jeep911
51cto/blog:http://jeep711.blog.51cto.com/
Code Cloud: Http://git.oschina.net/JEEP711/jeep711.github.io
Email: [email protected],[email protected]
This article from "JEEP711" blog, reproduced please contact the author!
2nd Article-java Foundation