Difference between Iterator and Enumeration

This article introduces the difference and efficiency between Iterator and Enumeration Iterator is an interface. Its source code is as follows: package java.util; import java.util.function.Consumer; public interface Iterator<E> { //Returns the reference of the element that the iterator just crossed. The return value is Obje ...

Posted by plowter on Thu, 05 Dec 2019 22:57:40 -0800

Noseparte says: There's nothing less HashMap to make Java play well

Brief Introduction As a Java programmer, HashMap is an inevitable data type.This is evidenced by both the frequency of use in development and the frequency of inspection in interviews. HashMap's Past and Present HashMap was born in JDK1.2. With the update of JDK version and to solve hash collision problem in HashMap in JDK1.7,Oracle team at JE ...

Posted by Davo on Thu, 05 Dec 2019 05:14:39 -0800

Sharing graph of wechat friend circle in pure Java

Sharing graph of wechat friend circle in pure Java 1. Realize the effect of sharing chart 2. Development environment 2.1 JDK *oracle's JDK above 1.8 2.2 font *If you choose Microsoft YaHei font and the code is deployed to Linux, you need to install Microsoft YaHei font, and google the font installation mode 3. Loading background 3.1 loading ba ...

Posted by aarchaic on Thu, 05 Dec 2019 00:47:32 -0800

Automatic generation of java test mock object framework DataFactory-01-getting Started tutorial

Project brief introduction Data-Factory It is used to generate initialization information randomly and automatically according to the object, which avoids the tedious of creating the object manually and is easy to test. Characteristic 8 basic types of support String, Date, amount, Date and other common types of support Java 8 common time class ...

Posted by kovudalion on Tue, 03 Dec 2019 02:12:12 -0800

Tomcat server of Centos 7 system

I. The Origin of tomcat Name origin: tomcat was originally developed by sun's software architect James Duncan Davidson. Later he helped turn it into an open source project, which Sun contributed to the Apache Software Foundation. Because O'Reilly, the majority of open source projects, will produce a related book and design its cover as a sketc ...

Posted by qartis on Mon, 02 Dec 2019 22:30:28 -0800

RPC based on TCP protocol

Preface: Environmental Science: windown 10 Eclipse JDK 1.8 Concept of RPC: RPC is a remote procedure call and the basis of distributed web site. Experiment SayHelloService.java interface class for specification SayHelloServiceImpl.java is the implementation class of SayHelloService Provider.java is the service providing class C ...

Posted by rg_22uk on Mon, 02 Dec 2019 09:34:18 -0800

Java Serialization and deserialization

I. what is it? Why? Serialization is the process of transforming the state information of an object into a form that can be stored or transmitted, and deserialization is its reverse process. Memory volatility; transmission needs; some application scenarios need to persist objects for reading when needed. II. API provided by JDK writeObject( ...

Posted by Ting on Sat, 30 Nov 2019 15:17:55 -0800

Java opens gc log

Build a jar package Using Spring Boot to build a simple web program, you can start it directly using java jar. @RestController @RequestMapping("/root") @SpringBootApplication public class SbDemoApplication { public static void main(String[] args) { SpringApplication.run(SbDemoApplication.class, args); } @RequestMapping("/h ...

Posted by alexboyer on Sat, 30 Nov 2019 01:55:40 -0800

[Linux] install Java on Linux

Sketch The Linux system used in this article is Ubuntu 16.04 and JDK is 1.8.0_. JDK Download JDK 1.8.0? Download link: https://pan.baidu.com/s/1AgiZ5DHnJjCVxBKPzdCddw Extraction code: v1ud Linux installing Java Create a folder in / usr/local / directory and upload the downloaded JDK through Xftp tool (if there is no Xftp ...

Posted by bmpco on Fri, 29 Nov 2019 12:51:56 -0800

Spring has only available on JDK 1.5 and higher error detailed solution!!!

Spring has only available on JDK 1.5 and higher error detailed solution!!! Summary: Summary: Previously, when learning Spring, there was a problem incompatible with the jdk version, and an error will be reported at runtime: Caused by: java.lang.IllegalStateException: Context namespace element 'component-scan' and its parse ...

Posted by sigkill-9 on Fri, 29 Nov 2019 10:49:10 -0800