Java core technology volume I Basic Knowledge (7), java Core TechnologyChapter 1 Set
Set Interface
Specific set
In a table, except for Classes ending with Map, other classes implement the Collection interface, while classes ending with Map implement the Map
JAVA core technology Volume 1, generic example, java Core Technology example
For this Code, many netizens are full of questions. First of all, there are a lot of questions. If you don't write the Pair class, you can compile it.
The Pair class is on the first two pages of oth
[Java core technology volume I (the ninth edition of the original book)] Chapter 1 collection, the ninth edition of core technology
This chapter describes how to use the Java class library to help us implement the traditional data structure in programming. Here, we only int
classes and packages:java -ea:... -da:MyClass MyAppYou cannot apply a system class that does not have a classloader, to use:-enablesystemassertions/-esaUsing assertions to complete parameter checkingUse the assertion scenario:
Assertion failure is a fatal, unrecoverable error
Assertions for development and test phases
Non-notification of recoverability errors should not be used as a means of informing users of problems.This method is not allowed to be called with a null array,
, it can be embedded, based on the class set that is currently loaded. If necessary, you can also undo the optimization.Multithreading : Multithreading brings better interactive response and real-time behavior. Multithreaded compilation is simple.Dynamic : Dynamic is important when some code is added to a running program. The current version of Java allows programmers to know the structure and behavior of objects. It is useful for systems that must pa
complete most functions of the field****************An iterator is a design pattern that is an object that can traverse and select objects in a sequence, and the developer does not need to know the underlying structure of the sequence . Iterators are often referred to as "lightweight" objects because they are less expensive to create.The iterator functionality in Java is relatively simple and can only be moved one way:(1) Use Method iterator () "Call
execution path; the so-called execution path refers to the directory list where the operating system searches for a local executable file.The same level directory in Jdk\bin contains the Src.zip file, which is the source code for all public classesGet more source code (compilers, virtual machines, local methods, and private helper classes, etc.) with access to: Oracle.net.Here is the anatomy of the JDK section:The difference between the JDK and the JRE can be seen clearly:There are three types
each other.Synchronization queueA synchronization queue is a mechanism for pairing producers with consumer threads. When a thread calls the Put method of synchronousqueue, it blocks until another thread calls the Take method, and vice versa. Unlike Exchanger's case, data travels only in one direction, from producers to consumers. Even though the Synchronousqueue class implements the Blockingqueue interface, conceptually it is still not a queue. It does not contain any elements, and its size met
InstantiationException, IllegalAccessException { returnnew PairnewInstance(), c.newInstance());}CallmakePair(Employee.class);The type parameter T matches the Employee.Generic type information in a virtual machineYou can use the reflection API to determine:
This generic method has a type parameter called T.
This type parameter has a subclass qualification, which is itself a generic type.
This qualified type has a wildcard parameter.
This wildcard parameter has a superclas
Now that we are in the 21st century, it is hard to imagine that Java-related books are so scarce, but this is just the case with Java. All the Java-related books were basically published by several Sun engineers, such as the "Hooked on Java" written by Arthur Van Hoff et.al and "The
called and passed to it with the methods object and the original invocation parameters. The calling processor must give a way to call processing.To create a proxy object, you need to use the Newproxyinstance method of the proxy class, which has three parameters:1: Class loader. As part of the Java security model, for system classes and from other classes, you can use a different classloader, currently using the default class loader with null notation
simple test, that is, do not use the exception to do the program to determine the branch; 2) to properly use the exception hierarchy, throw or capture, to try to use a class that can express a specific purpose, which will have better readability, Do not use throwable at all times, so that the readability is poor, 3) in the detection of errors, "harsh" than laissez-faire better, such as Stack.pop () is the return of NULL better or run out emptystackex
IncreaseDeleteThe Remove method allows you to delete a specified element.Find*************************************************HashSet can neither use the index of 0 1 2 3 to determine the value of an element, nor use key to determine the value of an element*********************HashSet like this ["AA", "BB"] grow into such a data structure******************HashMap grow into such {a=123, B=hello}Jsonobject very much like {"A": 123, "B": null}
Download address: Network disk download
Introduction to the content
One of the most influential and valuable works in the Java field, with more than 20 years of experience in teaching and research of senior Java technology experts to write (won the Jolt Award), and "Java Programming ideas," the same as the more than 10-year global best-selling not decline, popul
class does not have a way to modify the strings, if you really want to change them
The following expressions are legal
The = = operator detects whether two strings are placed in the same position
In fact, only string constants are shared, and the results of operations such as + or substring are not shared
Issupplementarycodepoint (int codepoint) is a Boolean method of the character class that determines whether the specified character (Unicode code point) i
Interneta Short history of Javacommon misconceptions about JAVACHAPTE R 2 the Java Programming Environment (new comments Total 20) Chapter 3 fundamental programming structures in Java (new comments Total 44) Chapter 4 Obje CTS and Classes (new comments Total 55) Chapter 5 Inheritance (new comments Total 42) Chapter 6 Interfaces and Inner Classes (new comments To
-code unit S u+d835 and u+dd6b. (see http://en.wikipedia.org/wiki/UTF-16 for a description of the encoding algorithm.) in Java, the char type describes a code unit in the UTF-16 encoding.Our strong recommendation isn't to use the char type in your programs unless you are actually manipulating UTF-16 cod E units. You is almost always better off treating strings as abstract data types.3.3.4. The Boolean Type The Boolean type has two values, false and Tr
interrupted by Interruptedexcetpion"); Thread.CurrentThread (). interrupt (); //The interrupt state is cleared when the interruptedexception exception is generated, all the interrupts are reset or thrown out for subsequent code to detect if an interrupt has occurred } if(thread.currentthread (). isinterrupted ()) System. out. println ("Sub thread is interrupted"); ElseSystem. out. println ("Sub Natural Stop"); } }; Thread T=NewThrea
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.