p272~p2731. Exception handling except for catching exceptions: continue to pass the exception to the method caller. That is: Add the throws description symbol to the method header, replacing the try Catch statement.for the caller of the method : either handle the exception or continue to pass. (This is checked by the compiler)2, it is better to continue to pass the exception than to handle the exception forcibly .3 . The exception class range listed i
The inheritance according to our Chinese popular understanding is does not need to pay the effort, obtains other people's ability or the asset, for example inherits the father's property, inherits the father's expression ability, inherits the father's appearance and so on. Inheritance within a class can be understood without the need to re-develop the code, you can reuse the parent class method and domain.In the inheritance relationship, you can be divided into the parent class and the subclass,
runs out, the operating system deprives the thread of its running power and gives another thread a chance to run.3, blocked threads and waiting threadsWhen a thread is in a blocked or waiting state, it is temporarily inactive.To enter a condition that is blocked or waiting:
When a thread attempts to acquire an internal object lock that is held by another thread, the thread goes into a blocking state. When all other threads release the lock, and the thread scheduler allows the thread to
usually iterate over all the elements and process each element, using flow operations to improve efficiency in parallel processing, to follow "what to do" without limiting what to do, providing the opportunity for integrity optimization to improve efficiencyThe flow surface looks similar to the set, however:1. Streams do not store elements, they are stored in the underlying collection or generated on demand2. Stream operations do not change their source data3. If possible, the stream operation
A basic data structureMust be included in the classMust have public static Main methodCase sensitiveIi. Types of dataFour types of integers:INT 4 byte short 2 byte Long8 byte byte1 byteTwo floating-point typesFloat 4 bytesDouleble 8 bytesChar Type, Boolean typeConstants use the final definition class constants using the static final definitionThird, Operation symbolsX!=0 1/x>x+y//If x=0, do not perform the calculation behind avoid x=0 1/x operationMa
leakage and overflow problems. However, in the event of Memory leakage and overflow problems, if you do not understand the VM memory running process, troubleshooting will be very difficult. The following figure shows the basic structure of the Java Virtual Machine.
2-1
2.2 Data Area During Running
Shows the data area when the Java virtual machine is runnin
method, the content of the PC register always writes an address of the command to be executed. The address here can be a local pointer, it can also be the offset relative to the actual instruction of the method in the method bytecode. If the thread is executing a local method, the PC register value is "undefined ".
--------------------- Java stack:Each time a new thread is started, the Java Virtual Machine
Java entry (2) -- it is true that the break is still punished... java is punished.
After more than a month of disconnection, the reading volume immediately drops from 100 + to 10-although it is not very important, after all, it is only when this is your study notes, but some people see, some people comment, some people
syntax, object-oriented features, core class libraries, and so on in sequence. while reading this book, let's take a look at thinking in Java to deepen our understanding of Java and how it works. At the same time, we can fully understand the entire Java System.For getting started books on
parts: the runtime Environment (that is, the JRE) and the development environment (that is, the JDK). The operating environment includes core APIs, integration APIs, user interface APIs, publishing technologies, and five parts of the Java Virtual Machine (JVM). The development environment also includes compilers that compile Java programs (that is, Javac). In th
Carefree college life allows time to pass through at your fingertips. One day is like a twinkling of an eye. Otherwise, how can so many students complain that they haven't gone to bed! Comfort breeds laziness and is always not false. Living in the ivory tower is always lost. When you are lazy, if you don't want to do one thing, you can find one thousand reasons to persuade yourself not to do what you should do.
In a twinkling of an eye, I went to my sophomore year. I learned
and had not yet entered the company, because it was still incomplete and has not been released. I thought I would use Java in the new company, so I have not yet entered the company to consolidate it (I have little knowledge about Java, but I have only read thinking in Java). However, after I entered the company, or do C ++ work ....... Therefore, this series of
The previous section briefly reviewed some basic Java programming knowledge. This section will continue to review and explore this knowledge based on the book Java core technology.1. String
The Java string is actuallyUnicode Character Sequence. For example, the string "Java
Gcc
Why the current GC occurs
-gccause
Tt
Survival threshold, if the object moves more than this threshold in the Cenozoic, it will be moved to the old age
-gcnew
Mtt
Maximum survival threshold, if the object moves more than this threshold in the Cenozoic, it will be moved to the old age
-gcnew
Dss
Ideal capacity of the survivor area
-gcnew
Number of capacity in table is: KBThe advantage of
Objective:The new journey officially began, after a two-week C-language preparatory class to learn, the development of the program has a first step of understanding. Now the Java curriculum also started as scheduled, for a programmer is to learn which language good has no need to explore, now that the Java ship naturally to go honestly, to what extent you see yourself, the individual is still a bit of confi
Java (4), java (2)
Can abstract methods be both static, native, and synchronized?
Abstract methods cannot be static, because abstract methods must be implemented by the quilt class, but static and subclass cannot be connected!
Abstract methods cannot be native. native methods indicate that the method must be implemented in another platform-dependent programmin
Java NiO mainly consists of the following core components:
Channel
Cache
Selector SelectorJava NiO actually has more classes and components than the above, but in my opinion, Channel,buffer,selector is the core API. Other components, like pipelines and file locks, are simply generic tool classes that are used in conjunction with the three
does not depend on class-specific instances and is shared by all instances of the class.
The definition of a method must have a return value type modifier, one of which indicates that the method has no return value, and that the keyword is void.
The main () method is the entry method for the Java application, which means that the first method to execute is the main () method when the program is running.
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.