New features of Java 5, Java 6, Java 7, Java 8
Java5:
Generics:After referencing generics, it allows you to specify the type of elements in a collection, eliminates mandatory type conversion, and has the advantage of type checking at compile time.
As parameters and return values, Generic is the cornerstone of vararg, annotation, enumeration, collection.
A. Type Safety
When y ...
Posted by [PQ3]RogeR on Wed, 26 Jun 2019 10:41:14 -0700
Java_log2000_Classes and Objects 4
Class Eny2
Keywords: Inheritance; Object class; Polymorphism;
inherit
Through the extends keyword;
Subclasses can inherit all non-private ly owned properties and methods from their parent class as members.
When a subclass inherits a parent class, it should first satisfy that the parent class is accessible, for example, when the subc ...
Posted by semtex on Mon, 24 Jun 2019 19:20:28 -0700
Object-Oriented in Groovy
As for groovy support scripts and classes, the previous section will briefly describe the relationship between scripts and classes. This section mainly introduces the related knowledge of classes in groovy, that is, object-oriented knowledge.
1. Types
1.1 Primitive Type
groovy supports the same raw data types as java, boolean, char, short, int, ...
Posted by theBond on Sat, 22 Jun 2019 17:41:40 -0700
7 Usages of Java enum Enumeration Types
DK 1.5 introduces a new type, enumeration. Although it is a "small" function in Java, it brings "big" convenience to my development.
Usage 1: Constants
Before JDK 1.5, we defined constants as: publicstaticfianl.... Now, with enumeration, you can group related constants into an enumeration type, and enumeration provid ...
Posted by newhen on Sat, 22 Jun 2019 13:59:51 -0700
Synchronization Control of Collections Collections. Synchronized Collection Sets
Synchronization Control of Collections Collections. Synchronized Collection Sets
Several synchronized Xxx methods are provided in the Collections class:
This method returns the synchronization object corresponding to the specified collection object to solve the thread security problem when multithreading accesses the collection concurrently. ...
Posted by dvayne on Thu, 20 Jun 2019 12:46:17 -0700
java RSA Encryption Generates license and CPU Sequence Number Generates Machine Code
The license contains registration information, a string of key-value pairs.
Symmetric encryption:
DES, AES, encryption and decryption all use a secret key, fast speed
Asymmetric Confidentiality
RSA can encrypt and decrypt public key with private key, or decrypt public key and private key with slow speed.
Be careful:RSA encrypts plaintext with ...
Posted by Kenwio on Sun, 16 Jun 2019 14:12:59 -0700
How Java implements multithreading
Java There are three main ways to realize multithreading: inheriting Thread class, implementing Runnable interface, using Executor Service, Callable and Future to realize multithreading with returned results. The first two methods of thread execution have no return value, only the last one is with return value.
1. Implementing multithr ...
Posted by zTagged on Sun, 16 Jun 2019 12:57:00 -0700
FutureTask Source Code Analysis
FutureTask is an asynchronous task executor that supports cancellation behavior. This class implements the method of Future interface.Such as:
Cancel Task Execution
Query whether the task is completed
Get the result of task execution ("get" task must be executed to get the result, otherwise it will block until the task is complete ...
Posted by tthmaz on Sun, 16 Jun 2019 11:38:57 -0700
Mybatis Interceptor
Page Helper is used to paginate with mybatis and Page Interceptor is used to understand the interceptor of mybatis. Mybatis version is 3.4.6, and Mybatis Helper version is 5.1.3.
1,PageInterceptor
Start with the previous code, List-1 as follows:
List-1
@Test
public void testPage() {
PageHelper.startPage(2, 3);
List<Person ...
Posted by RunningUtes on Sat, 15 Jun 2019 13:31:05 -0700
PinPoint implements mail alert
PinPoint installation deployment and the pit I encountered
PinPoint collector deploys, configures Tomcat and Dubbo services
PinPoint Use Tutorial
Some pits PinPoint trampled on
HBase and PrinPoint are deployed on different servers
PinPoint implements mail alert
After installing pinpoint, click the settings button in the upper right corne ...
Posted by Jiin on Sun, 09 Jun 2019 13:07:23 -0700