A language overview
Who is the father of Java? Did you build it?
Common JDK Versions:
JDK1.4.2
JDK5
JDK7
(2) Features of the Java language
There are many small features, with a focus on two open source, cross-platform
(3) The Java language is a cross-platform
For different operating systems, depending on the JVM to achieve.
(4) The Java language Platform
Se,me,ee
The role and relationship of B:JDK,JRE,JVM (mastery)
(1) function
JVM: Securing the Java language across platforms
Jre:java the operating environment of the program
Development environment of Jdk:java program
(2) Relationship
jdk:jre+ Tools
jre:jvm+ Class Library
My HelloWorld
class HelloWorld {
public static void Main (string[] args) {
system.out.println ("HelloWorld");
}
}
(1) Program interpretation:
The most basic unit of a a:java program is the class
format: class name
Example: Class HelloWorld
b: When writing content in a class, enclose it in curly braces. The
c:java program must have a main method to execute.
format: public static void Main (string[] args)
d: To point to those things, enclose them in curly braces.
e: What are you going to do?
Format: System.out.println ("HelloWorld");
Note: The contents of "" are subject to change.
(2) Java program Development execution flow:
a: Writing Java source program (. java)
b: Build A. class file by Javac command compilation
c: Run the. class file with the Java command
Common problems
(1) The extension is hidden
How to find: Tools--Folder Options--View--Remove the check mark for hidden extensions
(2) I ask for the same file name and class name.
In fact, it is possible not to do so.
Javac followed by filename + extension
Class name followed by Java without extension
(3) Java language is strictly case sensitive
(4) See illegal characters: \65307 is definitely a Chinese problem, requires pure English
(5) The pairing problem of brackets.
In general, the parentheses are paired up.
(6) encountered
Cannot find the main method in class HelloWorld, define the main method as
Must be a format problem for the main method.
Java language Overview