Two ways to implement serialization in Java Serializable interface and externalizable interfaceThe serialization of an object is the writing of an object to the output stream.Deserialization is the reading of an object from an input stream.The
/*** Get class loader * *@return */ Public StaticClassLoader getClassLoader () {//You only need to get classloader in the current thread returnThread.CurrentThread (). Getcontextclassloader (); } /*** Load Class * The Load class
PackageArray;Importjava.util.Arrays;Importjava.util.Collections; Public classGetminandmax { Public Static voidMain (string[] args) {/*** Gets the maximum and minimum values in the array*/integer[] number= {21, 43, 21, 32, 1, 2, 4,-1, 93, 5467, 38 };
Package string;public class Equals {public static void Main (string[] args) {/*** using "=" to compare two strings, is to compare the "address" of two objects is consistent,* The essence is to determine whether two variables point to the same object,
2018-03-011. Create and instantiate a Java class Packageday02;/** Object-oriented thinking of the ground rule one: * 1. Design the class and design the members of the class (member variables and • Member methods) * 2. Through the class, to create
1 PackageCom.atguigu.java;2 /*3 Understanding 1: People open the door4 process oriented: people open doors5 Object-oriented:6 Person {7 Open (door) {8 door. Open ();9 }Ten } One A Door { - Open () { - } the } - */ - /*Understanding Two:
E- Element (used in the collection because the collection holds elements) T-type (Java Class) K-key (key) V-value (value) n-number (numeric type)? -Represents an example of an indeterminate Java type:set represents an instance of the T class in the
Concurrent Programming (2) ---- volatile and synchronized (to be completed ),
This article mainly discusses volatile and synchronized, and introduces some basic concepts to give readers a better understanding of the two.
I. Several Related Concepts
1
Spark programming,
Persist (): cache data in the heap space of JVM in serialized form;
Cache (): Same as calling persist () at the default storage level;
Collect (): You can use collect () only when your entire dataset can be stored in the memory of
Three methods for searching Java strings and three methods for searching java strings
Indexof method:
Note: The indexOf method returns an integer indicating the starting position of the substring in the String object. If no substring is found,-1 is
Use of sigar, use of sigar
Unlike a common jar package, the Sigar API depends on the local library file for work, where:
Sigar. jar dependencies in Windows: sigar-amd64-winnt.dll or sigar-x86-winnt.dll
Sigar. jar dependency in Linux: libsigar-amd6
Java internal class summary, Java class Summary
Java internal class
I. Meaning
In Java programming language, a program is constructed by class. You can declare a class within a class.
The class is called an internal class.
Ii. Functions
Better
Tomcat hot deployment, the Web project thread is not terminated, tomcatweb
In a recent project, when you use jenkins to deploy a web project, you will find the static threads in the project (storing ScheduledExecutorService scheduled tasks in static
Differences between object-oriented and process-oriented, object-oriented
Process-orientedIs to analyze the steps required to solve the problem, and then useFunctionImplement these steps step by step and call them one by one.
Object-orientedIt
Java Collection framework
Java Collection framework
1. Direct difference between Collection and Collections
Collection is an interface under the java. util package and a parent interface at the Collection framework level. List and set interfaces
Use JDK1.8 CompletableFuture to process asynchronous tasks,0. Overview
A typical scenario of server-side programming is to avoid resource overhead caused by thread allocation for each request when receiving and processing client requests, the
How to Use the ValidateBox verification box in Jquery EasyUI (convert) and jqueryvalidatebox
Validatebox is designed to verify that the input form field is valid. If you enter an invalid value, it will change the background color of the input box
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service