What is the Java language?
Java is a fully object-oriented programming language, that is, the development platform, but also the deployment and operation of the platform.
Cross-platform features
You can run Java programs as long as the JVM is installed on the operating system. The JVM on different OS is downloaded by orancle company.
The function of the JVM: an upward explanation explains not only the execution of compiled Java instructions, but also security checks.
The Java language is written in C + + and has a clear purpose when developing the Java language.
1, complete object-oriented programming thought
2, multithreading
3, a sound security mechanism
4, faster development speed and operational efficiency
5, Beyond C + +
The above objectives are achieved by:
1,JVM (Hostpot technology, dynamic decision to compile or interpret execution)
2, automatic garbage collection mechanism (Finalize () method of object)
3, the code security mechanism (each JDK version of the security mechanism is different) as an applet (level three code security) For example: 1, permission check 2, bytecode check 3, dynamic monitoring of the execution steps.
First Java program:
Class hellodemo{
public static void Main (string[] args) {
System.out.println ("Hello java!");
}
}
The code written in Java is done inside the class.
Program structure of the Java language
- The package can have multiple
- Import can be multiple
- Definition of public class: up to one per file
- Classes and interfaces: can be multiple
Basic Java Knowledge points
- High-level language common things:
1, keyword 2, identifier
3, note 4, constants and variables
5, operators and expressions
6, Statement 7, Function 8, array
Learn this section only need to note: 1, its manifestation is how 2, when it uses
1, object-oriented (classes and objects)
2,javaapi
3. Use of common classes:
- String and StringBuffer class (String)
- Thread Class (Threads)
- I/O (data Flow)
- Exception (Exception)
Learn this section Note: Encapsulation of inherited polymorphic memory usage Analysis
Directions for Java:
- Java EE (Enterprise application Development)
- Javase (Desktop-level application development, is the foundation of EE and Me)
- Javame (embedded software, now mainstream is developing Android)
How to learn Java well?
- Have their own goals and directions.
- Don't rote grammar
- Practice more, don't be impatient
- Read more people's Code
- Beginners do not read too many books, first to find the basis of the book System of Learning
Problems with programming Attention:
- The so-called Theory Guide Practice, practice deepens The theory, said is first has the thought, then writes the code.
- Note Some coding specifications.
Understanding the Java language