原创 我的友情鏈接

51CTO博客開發

原创 Chapter 20 The I/O Package

1) The java.io package defines I/O in terms of streams, while the java.nio package defines I/O in terms of buffers and c

原创 Chapter 15 Annotations

1) Annoation /?n??te???n/  types present the information in a standard and structured way that is amenable to automated

原创 Chapter 14 Threads

1) You can create a thread like the following statement: Thread worker = new Thread(); A thread is a thread of execution

原创 Chapter 18 Packages

1) Packages define units of software that can be distributed independently and combined with other packages to form appl

原创 Chapter 17 Garbage Collection and Memory

1) The Java virtual machine uses a technique known as garbage collection to determine when an object is no longer refere

原创 Chapter 8 Primitives as Types

1) The primitive types and their corresponding Wrapper classes’ hierarchy:   2) Given that the wrapper classes are immu

原创 Chapter 3 Extending Classes

1) The collection of methods and fields that are accessible from outside a class, together with the description of how t

原创 Chapter 4 Interfaces

1) An interface can declare three kinds of members: constants(fields) methods nested classes and interfaces   All inte

原创 Chapter 12 Exceptions and Assertions

1) All exception types must extend the class Throwable or one of its subclass. There’re two kinds of exceptions in Java:

原创 Chapter 10 Control Flow

1) A switch statement allows you to transfer control to a labeled entry point in a block of statements, based on the val

原创 Chapter 13 Strings and Regular Expressions

1) String objects are immutable(read-only), and you have a StringBuilder class for mutable strings. More generally, the

原创 Chapter 5 Nested Classes and Interfaces

Classes’ fields are default to be protected, and the modifier is omitted implicitly. 1) A nested type is considered a pa

原创 Chapter 7 Tokens, Values, and Variables

1) The tokenizer is a greedy tokenizer. It grabs as many characters as it can to build up the next token, not caring if

原创 Chapter 6 Enumeration Types

1) In Java, an enum is a special kind of class, with an instance that reprsents each value of the enum. Example: enum Ca