Java Basic Concepts

Source: Internet
Author: User

First, where does the Java language come from? Development Platform Version
Originally a product of Sun, the Java language began in 1994
The father of the Java language: James Gauss Lin
Java language platform version: Javase: Basic version
Javame
Java EE: Enterprise Edition
Common versions:
JDK1.5 version
JDK1.7 version

II. JDK, JRE, JVM
JDK: Development Tools
JRE: Running Environment
JVM: Virtual Environment
The JDK contains the JRE,JRE containing the JVM
Java's cross-platform leverages the JVM, with each system having a JVM version of a different system platform, which helps us run programs on different platforms.

Iii. Common DOS commands:
1 Enter the specified drive letter: drive letter: (D:)
2 Entry Directory: single-level directory CD directory name
Multilevel directory CD directory name 1/directory Name 2
3 Directory fallback: Single-level fallback CD.
Multi-level fallback CD: /..
Fallback root directory cd/
4 Clear Screen: CLS
5 View IP Address: ipconfig (view local Area Connection) Ipconfig/all (view all connections)
6 Test Network connection: Ping IP address or URL
7 releasing the current Ip:ipconfig/relase
8 Re-fetch ip:ipconfig/renew
9 Compile case: javac filename. suffix (javac hello.java)
10 Run Case: Java file name (Java Hello)

Iv. notes
Single-line Comment
/* Multiline Comment */
/** Document Comments */

Five, key words
Keyword features:
1 words that are given special meanings
2 All lowercase, with highlight color hints
3 keyword not to do class name, etc.
Example: public class void Static ...

VI, constants
Definition: The amount of value that cannot be changed during program execution
Categories (5): String Constants ("Student")
Integer constants (common integers)
Decimal constants (Common decimals)
Boolean constant True False
Empty constant NULL

Seven, variable
Definition: The amount of value that can change during program execution
Format: Data type variable name = variable value;
Note: 1 within the same area (within the same brace), the name variable cannot occur
2 variable unassigned cannot be used (unless the variable is not used later)
3 variables are valid only within the current region

Viii. Types of data
Category: 1 Basic data types
Classification:
Integer type:
Byte accounted for 1 bytes -128~127
Short 2
int 4
Long 8 add L when writing
Floating point type:
Float 4 Add f when writing
Double 8 the default decimal type
Character type:
Char 2 0~65535 can store Chinese characters
Boolean type:
Boolean true False

2 Reference data types
Data conversion: 1 implicit conversion (byte,short,char->int->long->float->double)
2 cast Target data type variable name = (target data type) (result of operation);
(int n = (int) (3.6));

Nine, identifiers
Definition: A name used for a package, class, method, variable, etc.
Constituent rules: numbers, uppercase and lowercase letters, men, ¥ 、—— (numbers cannot start, not keywords in Java)
Basic principles: See the meaning of the name
Package Name: Package is a folder, used to classify the class management recommended company domain name reverse package name All lowercase
Class Name: One word capitalize more than one letter per first letter capitalized
Methods and variables: One word all lowercase multiple words starting with the second word, with each word capitalized in the first letter


Java Basic Concepts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.