1. Type:
- Javame (Java Micro Edition) Java mini version for small devices
- Javase (Java standand Edition) Java Standard Edition for desktop Systems
- Java EE (Java Enterprise Edition) for server programs and services
Note: Javase introduced by javabase
2. Development package JDK Introduction and Installation
Jdk<jre<jvm
- JVM (Java vritual machine) Java virtual machines convert bytecode into machine instructions
- JRE (Java runtime enviroment) Java Runtime Environment running Java program (contains JVM)
- JDK (Java Development Kit) Java SDK contains all the tools to develop Java (including JRE)
3. One place to compile, run around introduction
- The JAVAC program compiles the Java source code into a byte code.
- Different versions of the JRE on different operating systems to run byte codes.
Principle: Different versions of the JRE can run Java bytecode.
4. Configuring the development environment
1). Install JDK
2). Configure the PATH environment variable-Specify the location of the bin package
3). Configure the CLASSPATH environment variable-Specify where the JVM is going to find the class file (default is the current directory, which is not typically configured)
5.java Basic Syntax:
- The Java language is case-sensitive , as the main method main and main are different
- When a source file can have more than one class:
1). But there can only be one public class;
2). The source file name must be the same as the public class name;
3). The compiled bytecode file name is the same as the corresponding public class name
- A class must have a Main method to run; The main method is the entrance to the program.
6. Keywords and reserved words
- Keywords: programming language pre-defined, words specified for use
- Reserved words: As with keywords, the programming language is pre-defined, and currently has no specified purpose.
7. Define the name of the rule (class name, method name, variable name, etc.)
- Case sensitive
- Alphanumeric underscores, numbers cannot begin (Letters can be kanji and Japanese)
- Cannot use keywords and reserved words
- You cannot use class names in Javaapi for your own class name
8.helloworld Program
1 /**2 text Annotations3 @authorWhattoken4 */5 Public classHello6 {7 /*void does not return a value method8 Main is the primary function, the entry of the program9 */ Ten Public Static voidMain (string[] args) One { ASYSTEM.OUT.PRINTLN ("Output content");//Output - } -}
1. Into Java