statements
18. New features of JDK8 (new features of JDK8)
The method in the interface can be defined with the method body, if non-static, must be modified with the default
If it's static, it's not.class Test { public void run() { final int x = 10; class Inner { public void method() { System.out.println(x); } } Inner i =
1.string invarianceHere's a picture showing what this code does
12
String s = "abcd";s = s.concat("ef");
2.the difference between the Equals () method, the Hashcode () methodHashcode is designed to improve performance. The difference between the Equals () method and the Hashcode () method is that:
If two objects are equal (equal), then they must have the same hash value.
If two objects have the same hash value, they may not be equal (equal).
3.Hi
Java learning notes 8 --- class static variables and static methods access and call methods, java learning notes
Static variables are also called class variables, static methods are also called class methods. They are collectively referred to as static members or class members. Static members are modified by static and belong to the entire class. All objects shar
[Java concurrent programming] 8. Various lock concepts, java concurrent programming
Updating...
Shared lock (S lock ):If transaction T adds A shared lock to data A, other transactions can only add A shared lock to data A, but cannot apply an exclusive lock until all shared locks are released. Transactions authorized to share locks can only read data and cannot
and memory Management these C + + features are removed to avoid illegal memory operations #7, structurally neutral The Java source program is compiled into a platform-independent Byte-code format language that runs on the JVM. #8, Portable Java applications can run on any computer system equipped with a
At the end of 2006, Sun company released the final official version of Java Standard Edition 6 (Java SE 6), code-named Mustang (Mustang). Mustang has a good performance boost compared to Tiger (Java SE 5). Compared with Tiger's significant enhancements to the API library, although Mustang's new features in the API libr
Java SE 8 "2014-03-14 release "
Lambda expression
Pipelines and streams
Date and Time APIs
Default method
Type annotations
Nashhorn JavaScript engine
concurrency counters
Parallel operation
Remove PermGen Error
TLS SNI
java Version SE 7" 2011-07-28 release "
A s
Role:1, can understand the method declaration and use2, can understand the array of reference passing3, can understand the new Java features array supportDeclaration and use of a method1 Definition of the methodA method is a block of code that can be called repeatedly.2 definition format of the methodA public static return value type method name (type parameter 1, type parameter 2 ...) {Method Body:Program
1. Use System.GC () to request Java garbage collection regardless of which garbage collection algorithm the JVM is using. there is a parameter in the command line-VERBOSEGC can view the heap memory used by Java, its format: JAVA-VERBOSEGC classfile1 classTESTGC {2 Public Static voidMain (string[] args) {3 NewTESTGC (); 4 System.GC (); 5 syste
There are three main features of Object-oriented: inheritance and polymorphism, encapsulation . first, Abstract classBefore you learn about abstract classes, take a look at the abstract methods. An abstract method is a special method: it is only declared, and there is no specific implementation . The declarative format for an abstract method is:Abstract void Fun (); abstract methods must be decorated with the abstract keyword . If a class contains
Public classBasicdatatype { Public Static voidMain (string[] args) {/** Identifier: Used to name a variable, method, class, must begin with a letter, an underscore, a $ symbol. Combination of letters, underscores, numbers, $ symbols, and cannot be keywords * **/System.out.println ("--------------designator------------"); int$,_,a;//the correct naming intPeng = 12;//because of the Unicode encoding inside Java, it can be named with Chinese charac
A few days ago, we released the Android Studio 2.4 Preview 6. Now, in the JAVAC/DX compilation path, the Java 8 language feature will be supported by the Android build system. Android Studio's Gradle plugin now handles "de-icing" Java 8-class files, preserving only class files that are compatible with
1: What is annotation?Annotation, the word "@xxx" (such as @before, @After, @Test (timeout=xxx), @ignore), is generally translated into meta data and is a new feature of Java.-java new features of the mainstream unit testing Tools-annotation-groupthreetogether-group Blog2: A brief introduction to the meta-data:@Before:The method that uses the metadata is executed
The Java interface has undergone significant changes since 1.8. So the Java interface features can be divided into 1.8 versions before and after 1.8 versions.Features prior to version 1.8:
An interface can have only static global constants and public-modified abstract methods.
For the sake of brevity, the methods in the interface can be modified with
Java NiO's FileChannel is a channel for connecting files. Through the file channel, you can read data from a file or write data to a file. Both the FileChannel class and the standard Java IO API are available to read files.FileChannel cannot be set to non-blocking mode. It always runs in blocking mode.Open File ChannelYou must open the file channel before you use it. You cannot open the file channel directl
instance;
3), Jdk5, the new enumeration types are defined, specifically for solving such problems;
4), enumeration is a special Java class, you can define attributes, methods, constructors, implementation interfaces, inheritance classes;
------------------------------------------------------------------------------
Auto-unboxing:There are two kinds of data types in Java: Basic data type Reference data type
JDK8 has been out for a long time, here to learn a simple summary of the JDK5,JDK6 and Jdk7 new features:This article outlines:I. New features of JDK5Two. new features of Jdk6Three. New features of Jdk7I. New features of JDK5First, a brief introduction to the various features
Java 5.0 has been released, and many people will begin to use some new features of this JDK version. From an enhanced for loop to more complex features such as generic (generic), it will soon appear in your code. We have just completed a large Java 5.0-based task, and this article will introduce our experience with the
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.