[Java Study Notes] Chapter 4 of Java core technologies
Chapter 5 basic concepts of objects and classes 4th and objects
Describes the basic concepts of classes and objects and the relationship between classes.
Many objects in the program come from the standard library and some custom objects.
Structured Program Design: design a series of processes (algorithms) an
Java Self-study road one: learn to chooseFor the sake of employment, many students attend various trainings.The majority of people who are determined to do the software are Java, or. NET, and some have opted for mobile phones, embedded, games, 3G, testing, and so on.So what direction should we choose?My opinion is, do not too much believe all kinds of training in
JAVA basics: quot; Exception Mechanism quot; in Java in-depth study-Linux general technology-Linux programming and kernel information. The following is a detailed description. This article aims to explore the deep principles of Java "exception mechanism", so the usage of "exception" is not described in detail. First,
In-depth study of java. lang. Object Class, java. lang. object
Java class libraries are growing and contain countless classes and interfaces. But there are some very important classes and interfaces, which are the core part of the Java class library. Common include String, O
Java Nineth Week learning experienceThrough this week's study, learned the exception assertion and the log, has learnt to enable the assertion in the Eclipse compiler, but, regarding the exception, in the shorter teacher teaches the instance the procedure to be able to catch the exception, but in the Long program task Seven task Eight does not know is what kind of exception, No exception catch exception sho
Java 11th Week learning experience through the 11th week of study, learned vetor, Stack,Hashtable class, edit run Arraylistdemo and linkedlistdemo two programs and Setdemo, the teacher in class analysis code, and let us experiment, master the better, but the book of the program 365 page 9-2set/settest not very understand, this code through the package import, I do not run out of results, do not know wher
, select the version that matches the operating system architecture, install the source code base, use the integrated development environment Eclipse, an open source, Jav-based, based on the computer you are using A's extensible development platform. The link runs a Java program:Welcome.java, in console cmd, The compiler javac the. Java source file into a. class bytecode file, and the
static void Parkuntil (longDeadline) {Unsafe.park (true, Deadline); }}4. CAS operationis achieved through the Compareandswapxxx method.The/*** compares the values in the memory location of the offset at obj and the expected value, if the same is updated. This update is non-disruptive. * * @param obj object to update * @param offset of integer field in offset obj * @param expect you want the value present in field * @param update if the expected value expect is the same as field's current values
, it wakes the thread and re-holds the Spilllock lock.As can be seen here, the use of lock can make our multi-threaded interaction easier, and the use of synchronized does not do this.Finally, the Reentrantlock class also provides 2 mechanisms for competitive locking: Fair lock and unfair lock. The meaning of these 2 mechanisms can literally be understood: that for multithreading, a fair lock relies on the order in which threads come in, and the subsequent thread gets a lock. The non-fair lock m
the initialization of the instance member is after the static member. 3. A static domain in a class can be accessed either by an object name or by a class name. "Solved the problem.Last week's experimental exercise is just a small test sledgehammer, this week's program has made me feel small difficulty, although clear algorithm, but always to C language inertia to consider, to write programs, sometimes a little messy, which caused my program has a lot of grammatical errors, although looking at
[Java Study Notes] Chapter 5 inheritance of Java core technologiesChapter 2 Inheritance
Using inheritance, You can construct a new class based on an existing class. Inheriting existing classes is to reuse (inherit) the methods and domains of these classes. You can also add new methods and domains.
Reflection.5.1 superclass subclass
Use extends to construct a deri
examples are as follows:Bytebuffer Header = bytebuffer.allocate (+); Bytebuffer body = bytebuffer.allocate (1024x768= {header, Body};channel.read (Bufferarray);Note that buffer is first inserted into the array, and then the array is used as the input parameter of the Channel.read (). The read () method writes the data read from the channel into buffer in the order of buffer in the array, and when one buffer is full, the channel is written to the other buffer.Scattering reads before moving the
java 12th Week learning experience In the 12th week of the theory class, the teacher of the 1-4 chapters of the content of the test, the program fill in the blanks and write procedural questions are not very high, the important part of the program is missing, for the total number of books that will not be written, deduction points more, but now have mastered, the next to the computer more practice, Friday teacher on the new content of the tenth chapt
least for the present, September 2007, I recommend Java.Can not agree with my point of view, but there is no doubt, if it is for employment, more to the recruitment site to read the information of the job, the direction of your future and learnLearning is of great benefit.Choice is the most painful, see "natural shopaholic" in the Lau Ching will know, but since can not escape, make your own choice.Everyone will be influenced by others, and before making a decision, try to make yourself rational
Java Fifth Week learning experience through this week's study, the inheritance has a certain understanding, but not very familiar with the teacher in class according to the previous method of the fifth section of the understanding of the deeper into a bit, but also need a lot of code to grasp the deeper, because the method of sudden change, or there is a little unaccustomed, so now still in the adaptation
then it must first create an object of the member's inner class and then access it by referring to the object. A member inner class exists that is dependent on an external class, that is, if you want to create an object of the member's inner class, as long as an object of an outer class must exist.In addition, in the completion of the experiment, there is a clue, can build the framework and algorithm, but not a clear idea to determine what each step to do, is I write a program of a major obstac
Java study notes, java notes
Exception(1) abnormal procedures.(2) abnormal SystemThrowable| -- Error. Serious problem. We will not handle it. ·| -- Exception| -- RuntimeException: An exception occurs during runtime. We need to modify the code.| -- Non-RuntimeException exception during compilation, which must be handled; otherwise, the program compilation fails.(3
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 emptystackexception better? The author thinks the latter
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.