Programmer's Tutorial-Chapter 11-java Program Design

Source: Internet
Author: User
Tags arithmetic

You are learning Java, first read the 11th Chapter Java bar.

  List chapters to make it easy to remember content.

11.1 Java language Overview

1 features of the Java language

2 Java Development environment

11.2 Java Language Basics

11.2.1 Basic data types

1 arithmetic of integer type and integer

2 floating-point data types and operations

3 Character data type

4-bit arithmetic

5 Boolean data types

11.2.2 Control Structure

1 if statement

2 Switch statements

3 Loop statements

4 Jump statements

11.2.3 Java Core class

1 Object class

2 String class

3 Stringbuild String

4 StringBuffer string

5 arrays

11.3 Classes and Interfaces

Definition and use of 11.3.1 class

Initialization of the 11.3.2 object

11.3.3 Bag

1 Defining packages

2 Introduction Package

3 Class of Access control

Access control for Class 4 members

11.3.4 inheritance

11.3.5 Abstract classes and interfaces

1 abstract class

2 interface

3 Comparison of abstract classes and interfaces

11.4 Exceptions

Handling of 11.4.1 anomalies

11.4.2 Custom Exceptions

11.5 inputs, outputs, and streams

11.5.1 byte stream

11.5.2 character Stream

11.5.3 standard input/output stream

1 system.in

2 Java.util.Scanner

3 Java.io.Console

4 Java.util.Formatter

11.6 Use of Java class libraries

11.6.1 types of packages for basic types

1 constants

2 Construction methods

3 Common methods

11.6.2 Generics and collection classes

1 generic type

2 Collection

  Write down some of the points of knowledge that you do not pay attention to and don't know.

1, the length of the identifier in the Java program has no upper limit, by letter, number, line and dollar symbol and composition, with the letter, line or dollar sign, you can use Chinese characters.

2, JAVA7, support in the middle of the numerical type with the underscore character, the line can be any number of lines. Floating-point numbers also support drawing lines in the middle of a number but are illegal in the following cases.

(1) Start or end of data.

(2) The decimal point in the floating-point number.

(3) after F or L.

(4) The position where the numeric string is required.

3. Switch condition can be introduced by string (JAVA7)

4. Break flag and Continue flag

5, the array in Java is treated as an object, so, in a multidimensional array, the array of each dimension can contain different number of elements

6, Java.util.Arrays tool class, Deepequals () compare the arbitrary depth of the nested arrays are equal

7. The Java language allows classes to be defined in a class, called inner classes or nested classes. The inner class is divided into static and non-static, both as members of the outer class.

8, the initialization can be divided into two stages, the first stage is the initialization of the class, and the second stage is the initialization of the class instance (object). In the initialization phase of a class, the declaration initialization and static initialization blocks of a static variable are executed, whereas in the object initialization phase, the declaration initialization and non-static initialization blocks of the instance variables are executed first, followed by the execution of the construction method. Declarations and initialization blocks initialize variables in the order in which they are written in the source code. (PS: If it involves inheritance, then it will be more complex, can see the relevant information)

9. Static Introduction

10. Class access control is divided into two types: public and default

11. Subclasses can explicitly call the constructor of a superclass by super, or access member variables and methods in the superclass. The call construction method is in the form of "super ()" and must be the first statement in the constructor method of the subclass.

12. Abstract method cannot be modified with private

13. Abstract class cannot be modified with final

14. When defining methods and constants for an interface, you do not need to add any modifiers

15, the exception is divided into two kinds: error (Errors) and exception (exception), they all inherit the Throwable class. Error is generally related to virtual machine issues such as system crashes, virtual machine errors, dynamic link failures, and so on, which cannot be recovered or captured. Exception is a problem that can be captured and processed by the system due to procedural errors or external factors. Typically, a program does not need to handle exceptions of type error, but it should be concerned with exceptions of type exception. Exception divided into two categories: non-check type exception, check type exception

16, standard input, standard output, standard error output. Can be redirected, E.printstacktrace () is the standard error output of the

17, for float and double,min_value to indicate the minimum positive value

18, the Type property of the wrapper, get the keyword of the basic data type corresponding to the class

19. The integer and long classes also provide the tobinarystring (), tohexstring (), and tooctalstring () methods to convert a value to binary, hexadecimal, and octal strings, respectively.

20, Collection has 4 kinds of basic data structure: List (linked list), set (set), Queue (queue) and deque (double-ended queue), map mainly has two data structure: Map (map) and SortedMap (ordered map), Arraydeque and LinkedList are deque implementation classes (about the collection, can say a lot, you can find the relevant information)

Programmer's Tutorial-Chapter 11-java Program Design

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.