# Thinking in Java 4th# reading Note# Victor# 2016.02.16Chapter 2 It's all about the object.2.1 Manipulating objects with handlesUse a handle as an identifier to point to an object. But owning a handle does not mean that an object is connected to it.
Static represents the meaning of "global" or "static", which modifies member variables and member methods, and can also form statically static blocks of code that are independent of any object of that class by static decorated member variables and
Wrote a Java reflection mechanism, not a write, should be copied, because it was written by others, this one is written by others, excerpt as follows:From the Java Foundation-the reflection mechanism of knowledge point carding, the author eyes are
While loop
(Inside is a loop condition is also an expression) Boolean expression a>b; Returns a result of true false
For and while are a type of loopint sum=0;int i=11;(一)while(i
Dowhile Cycle
Dowhile is until the type
The simple factory model described in the previous article has the advantage of decoupling the business from the factory class. However, the factory method contains logical judgments, based on the client's choice of dynamic instantiation of the
Mind Map tips: Mind map, also known as Mind Map, is an effective graphical thinking tool to express the emission thinking, it is simple but extremely effective, is a revolutionary thinking tool. Mind map of the use of text and graphics skills, the
Experience Sharing:1. If the delimiter is an escape character such as ".", "|", "*", "+", use Str.split directly (".") Throws an exception, all must be preceded by "\ \", such as split (\\|);2, if "\" as a separate, you have to write this:
When a program creates an entity of a reference type, such as an object, an array, a memory is allocated to the object in the heap memory, the object is stored in that memory, and when the memory is no longer referenced by any reference variable,
"Lovelorn, alas, has not begun to end ... Alas...... Keep Looking at Java "Today is the weekend, let's see what the Java reuse mechanism is. As you know, code reuse is very useful, and this feature is an important part of Java. What does Java use
1 Packagescanner;2 3 Public classSingleand {4 5 Public Static voidMain (string[] args) {6 7 int[] First = {10,15,8,5,0};8 9 int[] Second = {4,8,1,2};Ten One intresult = 0; A -
Three major features of JavaEncapsulation, inheritance, polymorphismThe difference between an abstract class and an interfaceJava Abstract class:Classes that use the keyword abstract adornment are called abstract classes.The method of modifying with
Original link Author: Jakob Jenkov Translator: Li Jing ([email protected])In addition to character-based, reader and writer for Java Io are very similar to InputStream and OutputStream. They are used to read and write text. InputStream and
1. Why interfaces are usedThe interfaces in Java are a set of requirements descriptions. For example, the following is the definition of the Comparable interface: Public Interface Comparable { int compareTo (T o);}A CompareTo method is defined
Author: Jakob Jenkov Translator: Li Jing ([email protected])This section briefly summarizes the Pushbackinputstream,sequenceinputstream and PrintStream in Java IO. Among them, the most common is printstream,system.out and System.err are printstream
Class Package Subclass WorldPublic y-y y yProtected y y y NDefault y y n nPrivate y-n n NAccess rights: Public>protected>default>privateFor the public modifier, it can be accessed by all other classes and can access class,interface, exceptions, and
First, prefaceLinux has been used for a period of time, but after each study work, no record of their own experience. And then every time after a long period of work again, you have to revisit the various materials. Therefore, now learn good, will
Common Java APIsJava.io.BufferedReader class (used to read a paragraph of characters from a file; owning kit: java.io)1. Constructor BufferedReader (java.io.FileReader filereader variable) Description: Creates a new Bufferreader object.2. Close
JAVA data type automatic conversion, and forced conversion, java Data Type
I. Automatic Data Type Conversion
Public class Test {public static void main (String [] args) {int a = 1; double B = 1.5; double a_ B _count = a + B; // when the integer
Java Abstract class, java Abstract
Not to mention, let's start with a code segment.
Public class Abstract {public static void main (String [] args) {cl2 c = new cl2 (); c. method () ;}} abstract class Abc {public abstract void method ();} class cl2
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