Java Programming Idea-this book

Source: Internet
Author: User
Tags try catch

Object-oriented features

Theory (sense Java design, is to achieve these purposes to write code like that ~)

1) All things are objects

2) A collection of program-time objects that they send messages to tell each other what they want to do

3) Each object has its own storage composed of other objects

4) Each object has its type

5) A particular type of object can receive the same information. Oop

Object-oriented features

Classes and objects, a class is a collection, and an object is an instantiation of a class.

Inheritance: Object

Polymorphic:

Data abstraction:

Container: Map,list,set Object type

Java Basic Types

Since everything is an object then, char c = ' x ';

Can also be written as Character ch = new Character (' X ');

Object creation and Reference

Class dataonly{

int i;

Double D;

}

DataOnly data = new DataOnly ();

DATA.I = 20;

DATA.D = 0.1;

Java method = = C function

Import imports the corresponding package, import java.util.* a bunch of packages at a time

The static keyword can be called directly. http://java.sun.com website Download JDK document haha now estimate and not

Comment Document in code: Javadoc can separate comments and code

Code naming style: Camel style Applehwawei

Operator: Feel and C are the same +-+ +

Control execution Flow: Same as C. if-else

Foreach

Constructor, method overload (discriminant with different parameters): initialization when new object is initialized

this keyword

X.increment (). Increment (). Increment.print ();

Garbage collection mechanism, only objects created by new are recycled

Finalize () function. Initiate garbage collection in advance to verify that the data is accurate

Enum and switch this pair of CP

Access: Some people are the same as you, but you change. So wrap it up so they're always BB? Public, protected, provate

Package name, class name (IDE to familiarize yourself with)

Extends inheritance and composition (add other classes to the class)

Final and other keywords (data cannot be changed)

Uses the difference between the inheritance expression behavior, and uses the field to express the change in the state.

Abstract class (No write-all class framework)

The sense that Java is more suitable as a schema, C language suitable for the module. Before because it is embedded development so not to write code, it has been difficult to feel

interface keyword, an interface that combines multiple classes, called multiple inheritance

keywords, interfaces, abstract classes

============================

Inner class, Anonymous inner class (Java Special Technology Implementation) The original book was ugly.

Inner class Add static is a nested class that is not associated with a perimeter object

Why do we have an internal class

Each inner class can be independently inherited from an implementation of an interface, so no matter whether the perimeter class has inherited an implementation of an interface, there is no effect on the inner class.

Multi-inheritance design?

Internal classes and interfaces in order to implement multiple inheritance

Java Container Class Library, which holds objects. (It feels like a chain list)

Related Operations for container classes (map, list, set, queue)

Exception handling: Focus on the issues you want to deal with.

Try catch.

Finally

Class

String is glorious because of the web

Formatter conversion

Regular expression Java string

Type Information acquisition

RTTI (to be known at compile time)

Reflection (Dynamic)

In-depth study of the container of generics (many words) (many words)

Java I/O system (I feel this should be no use now, this is the Java virtual machine directly write data to the hard disk)

File InputStream and OutputStream

Annotations (for compilers, similar to C language volunteer, but mostly logs?) This is a little strange.)

@Override, @Deprecated, @suppressWarnings

Concurrency Considerations for use

Thread lock? When should I use a thread when should not

Swing Java Graphical

It's supposed to be very rare.

Java Programming Idea-this book

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.