Thinking in Java note I

Source: Internet
Author: User
Tags bitwise operators logical operators

Introduction to the first chapter object

1.1 Abstract Process

Establishes the association before the machine model (the solution space) and the actual problem model (problem space). Object-oriented objects represent the elements of the problem space as objects in the solution space.

Five basic features of object-oriented language: all things are objects; A program is a collection of objects that communicate what they need by sending messages; Each object has its own storage made up of other objects;

Each object has its type, and all objects of a particular type can accept the same message

1.2 Each object has an interface

interface determines the requests that can be sent to a particular object

1.3 Service for each object

Imagine an object as a "service provider"

In a good object-oriented design, every object can do a good job, but it doesn't try to do more.

1.4 Concrete implementations that are hidden

Class creator and client programmer, access control makes it impossible for client programmers to touch the parts they should not touch

1.5 Multiplexing specific implementations

Code reuse is one of the great advantages of object-oriented programming languages

Composite aggregation

1.6 Inheritance

Methods for deriving differences between base classes and derived classes: adding new methods (is-like-a); overriding base class methods (Is-a Overrides)

1.7 Interchangeable objects associated with polymorphism

Object-oriented programming function calls using late binding

1.8 Single-Root inheritance structure

Single inheritance ensures that all objects have some functionality (garbage collection, polymorphism)

1.9 Containers

Set parameterized type (generics)

1.10 Creation and life cycle of objects

Java fully uses dynamic memory allocation, garbage collection

1.11 Exception Handling: Handling Errors

Exception handling is like the other way of doing the wrong work in parallel with the program's normal execution of the road strength

1.12 Concurrent Programming

1.13 Java and the Internet

This chapter is really an introduction, and probably introduces some of the core concepts of object-oriented programming and Java.

Chapter II Everything is the object

2.1 Manipulating objects with references

Reference Footprint Java specification does not stipulate

2.2 All objects must be created by you

Storage: Registers, stacks, heaps, constant storage, non-RAM storage

High Precision Digital BigInteger BigDecimal

Array

2.3 Never need to destroy objects (feel not translated well, meaning that you do not have to voluntarily destroy the object)

2.4 Creating a new data type: Class

2.5 methods, parameters, and return values

2.6 Building a Java program

Static keyword

2.7 Your first Java program

2.8 Notes and documentation

2.9 Coding Style

This chapter is a primer for a basic program

Chapter Three operator

3.1 Simpler Print Statements

Static Import

3.2 Using Java Operators

3.3 Priority level

3.4 Assigning values

3.5 Arithmetic operators

3.6 Auto Increment and decrement

3.7 Relational operators

3.8 Logical operators

3.9 Direct Constants

Constant suffix

3.10 Bitwise Operators

3.11 Shift operator

3.12 Ternary operator If-else

3.13 string operator + and + =

3.14 using operators often make mistakes

if (x=y)

3.15 Type conversion operators

Truncated rounding Math.Round

3.16 Java no sizeof

The fourth chapter controls the execution process

4.1 True and False

4.2 If-else

4.3 iterations

4.4 foreach Syntax

4.5 return

4.6 Break and continue

4.7 Infamous Goto

Break label;

Continue label;

4.8 Switch

Thinking in Java note one

Related Article

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.