Beginner java-Foundation

Source: Internet
Author: User

1.java concept

Java is a simple, object-oriented, distributed, interpreted, secure, portable, high-performance multithreaded language. With its strong security, platform independence, hardware structure independence, Language concise, object-oriented features, in the Network programming prophecy occupies an incomparable advantage, become the realization of e-commerce systems, enterprise management platform, mobile device application development, such as the preferred language.

2.java Technical Features

Java technology can be divided into Java programming language and Java platform. The Java programming language is a high-level programming language. Language features: Simple, structured-neutral, object-oriented (java00) "Object-oriented Programming (00p)", distributed, portable, high-performance, multi-threading, robust, dynamic, secure.

3.java Development

The JAVA2 platform is divided into 3 versions in 3 major areas: j2se-Standard Edition, Master for desktop application development, as the foundation of the Java EE; j2ee-Enterprise Edition, suitable for server, focus on the enterprise level of distributed software system; j2me-mini version, the primary used for embedded devices belongs to a subset of J2SE , but has its special class library support.

4.java Basic Syntax

(1) Java keyword: boolean,break,byte,abstract,case ... (cannot be used as an identifier)

(2) Java identifiers: rules followed by identifiers

(3) Java Usage data type: Basic data Type (integer: Byte,int, short,long float: float,double character: Char Boolean: Boolean), reference data type (class: Class interface: Interface array)

(4) Variables and constants for Java: Variables are used to store data and define constants.

(5) Java Operators and expressions

(6) Java annotations

5. Program Flow Control

Select and loop statements are called control structures. (Boolean logic, If/else statement, switch statement, for Loop, while loop, Do/while Loop)

6. Classes, objects, and packages

Class: Classes in Java are declared with the keyword class. The Java source code file can contain only-public classes, and the file name must be the same as the class name of the common class with the extension ". Java".

Object: In Java, the new keyword is used to instantiate an object.

(1) Adding member variables to the class (with default initial values)

(2) Adding a method to a class

Classes and objects:

A class is an abstraction of an object that is an instance of a class. Class attribute (feature, Static), method (behavior, dynamic) is a combination of a set of objects that have the same properties and behavior.

Package: The package is used to organize the class, and the first line of the executable statement must be placed when declaring the package.

Fully qualified name: Pkg.test.pkgDemo

Beginner java-Foundation

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.