Java core technology-New Features of Java 8-Lambda expressions1. General description
Java 8 new featuresFunctional InterfaceLambda expressions (closures)2 Java 8 new features
Oracle released the official Java 8 version in March 20
java MyProg >log.txt
5) The processor that can change non-default catch exception
Thread.setDefaultUncaughtExceptionHandler{
new Thread.UncaughtExceptionHandler(){
public void uncaughtException(Thread t, Throwable e){
//save info to file
}
}
}
6) If you want to see the class loading process, you can invoke the-verbose flag to start the Java
process is a layer of constantly abstract process, then the most detailed products appear general.And in the study of the specifications of the Java EE did not understand, why should have j2ee13 a specification, in the specification of the Code play what role? Is it a first-class standard? We are able to compare it with. NET,. NET is Microsoft's strategic product, and the description of the Java EE describ
variables will reference the same array. The copy here is implemented with the assignment symbol =.10.4 Array SortingWhen you need to sort a numeric array, you can apply the sort method in the arrays class.10.5 Multi-dimensional arraysMultidimensional arrays use multiple subscripts to access array elements, which are useful for representing tables or more complex permutations. For example, declaring a two-dimensional array
Double[][] A;
Again, it is not available before initializa
Java terminology
Term name
Abbreviation
Explain
Java Development Kit
Jdk
Software used by programmers who write programs
Java Runtime enviroment
Jre
Software used by users running Java programs
Server JRE
Software that runs
Java operating mechanism
the JVM of the core mechanism
The JVM is the runtime environment for Java programs The
JVM is part of the JRE, it is a fictitious computer, or it can be understood that the bytecode file is
interpreted as a machine instruction on a specific platform when the byte code file is executed by the CPU JVM with the byte code as the machine in
, in the programming language, threading can be a love-hate paradox for programmers, which can greatly simplify the model, help programmers write powerful code, and, on the other hand, make our programs appear with a variety of bugs that can be difficult to reproduce in the development environment.
Here the author based on the "Java Core technology" book and some Bovinlai to share with you on
To prepare to learn the next Java, according to the "core Java" content, simply made a note. There are many places in this book that compare the syntax of C + + and Java, so it's very advantageous for those who turn from C + + to Java!Javac Xxx.javajava XXXJava Applet:applet
Recently I read core Java, but I have never understood it before. I have read many posts and blogs and finally understood it.
In Java, the char [], String, stringbuilder and stringbuffer class adopts UTF-16 encoding, using U + 0000 ~ U + FFFF represents a basic character (BMP character), but Char located in U + d800 to U + dbff and U + dc00 to U + dfff is conside
in any order, but are always retrieved in sorted order. Whenever the Remove method is called, the smallest element in the current priority queue is always fetched, but the priority queue is not sorted.Use data Structure = = "HeapThe heap is a self-adjusting two-fork tree. You can have the smallest elements move to the tree root without having to spend time sorting.Typical case: Task schedulingPriorityqueue ();Constructs a priority queue for holding compareable objectsPriorityqueue (int initialc
= Point.class;System.out.println (C3.getname ())//PointEach object in the class generates a Class object in the virtual machine to hold the information for each class, which can be obtained to obtain all the information about the class.A virtual machine manages a class object for each type,You can compare two classes of objects with = = (E.getclass () = = Employee.class) ...You can also reflect the created object E.getclass () After you get the instance. newinstance ();Newinstance () will tune
Java -- JDK dynamic proxy core source code parsing, java -- jdk source code
1. First, let's take a look at how to use JDK dynamic Proxy:
Public static void main (String [] args) {/*** creates a Bean object that implements the BeanInterFace interface */BeanInterFace bean = new Bean (); /*** create a MyProxy object that implements the InvocationHandler interface an
[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
At present, multi-core CPU is the mainstream. The multi-core technology can effectively leverage hardware capabilities and improve throughput. For Java programs, concurrent garbage collection can be implemented. However, Java uses multi-core technology to bring about some pr
"Original" https://www.toutiao.com/i6594587397101453827/Java Core Data structure (List,map,set) usage tips and optimizationsJDK provides a set of major data structure implementations, such as list, MAP, set and other common data structures. This data is inherited from the Java.util.Collection interface and is located in the Java.util package. 1. List interface The three most important list interface impleme
Observer observer the message and the event is one, the difference is that when inheriting Java codeChanges in different ways.The triggers in the database are somewhat like this, but they are not generally compared.Similar to the Django views.py, how does the Web. XML modify the code so that it can map URLs to the actual file address?Set Jsp-file-servlet-name, Url-pattern- servlet-name, to get Url-pattern to jsp-file mappings.I want to change the Web
Java has become a large and complex technology platform, for developers to better grasp the Java technology, in-depth understanding of the underlying technical processing details is essential. Mastering core concepts and ideas can help us extrapolate and comprehend by analogy and help us improve our understanding of the entire
not recommend not knowing when to callPackage import with ingest package is similar to reference namespacePackage = = NamespaceImport = = usingStatic ImportClass Design Tips1) Guaranteed Data privacy2) Initialize the data3) Do not use the base type too much in the class (you can use the aggregation relationship instead)4) Not all domains require separate accessors and converters5) Decomposition of classes with excessive responsibilities6) The class name and method name should be able to reflect
. Cannot instantiate a type variable, cannot construct a generic arrayCannot be new T (...), new t[] or t.class, because when the type is erased, T becomes the object typeor Object[2],new object () is not what we want to see, you can use reflection to create an objectFirst. T.class is not legal.public static {try{return new Pair}catch (Exception ex){return null}}Pair6. Invalid type variable in static context of generic classCannot reference a type variable in a static field or methodpublic class
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.