Server Socket Channel and Socket Channel of Java NIO
ServerSocketChannelServer Socket Channel role? What do you do full-time? 1. Monitor the new TCP link channel. 2. Create a new Socket ChannelServer Socket Channel does not have any capabilities Server Socket Channel does not have ...
Posted by sharugan on Tue, 21 May 2019 13:44:11 -0700
Java Collection Series (II)
Preface
Through the introduction of the last Java Collection Series (1), readers must have mastered the basic concepts of collections. Next, the author will focus on the functions of each interface of collections and its common subclasses.
Definition of Collecton Interface
The Collection interface is defined as follows:
public intefa ...
Posted by first_lady_the_queen on Tue, 21 May 2019 11:45:49 -0700
Java programming ideas Chapter_14 type information
There is a noun around this chapter: Run-time Type Identification runtime type recognition
Someone knows that the author introduced this concept from C++, but it doesn't matter. Understanding and concatenating this chapter is the most important thing
The content of this chapter is actually for the type of information service, the main content i ...
Posted by betportal on Tue, 21 May 2019 10:56:57 -0700
Write a simple LinkedList by yourself
I've written a brief version of ArrayList before, but now I'll go over a brief version of LinkedList (ps thinks that LinkedList in jdk source code has a lot of verbose and repetitive methods by looking at the source code).
First, LinkedList implements a linked list. A linked list defined by this class can also be used like a stack or queue. ...
Posted by derezzz on Mon, 20 May 2019 13:36:34 -0700
Collective Source Learning (6): TreeMap
Start with this blog and slowly learn about Map collections together
What is Map?
Map is different from List. In List, we remember that it is mainly a linear list, which can be subdivided into Array List, Vector, and LinkedList. ) And the main thing is that List has only value, that is, only one value. In Map, it stores a combination of ke ...
Posted by sysera on Sun, 19 May 2019 16:15:25 -0700
[Suspect] JVMCFRE003 bad major version, offset=6
Today, Deploy static resource packages come into our Production environment. Only static resource files, such as database connection information, SQL query statements, are involved in the package. After successful deployment, the following error occurred when starting the service:
Exception in thread "main" java.lang.UnsupportedClassVersionErro ...
Posted by F1Fan on Sun, 19 May 2019 10:50:27 -0700
Java programs deploy settings related to CPU and MMORY resource constraints in K8S containers
background
Execute Java programs in the k8s docker environment, because we set the limit of cpu, memory, so the parameters of the JVM are not associated with the parameters we set when the Java program executes, resulting in the CPU and memory that the JVM perceives as the size of the CPU and memory on our k8s work node.The problem with this is ...
Posted by dirty_n4ppy on Sun, 19 May 2019 10:16:36 -0700
Java Strong Reference|Soft Reference|Weak Reference|Virtual Reference
Due to the existence of GC auto-recycling mechanism in Java, the mechanism of reference counting is relatively perfect. Java divides the references of holding objects into strong references, soft references, weak references, virtual references in order of strength and weakness. Good use of references allows GC to quickly recycl ...
Posted by weekenthe9 on Sun, 19 May 2019 09:22:04 -0700
hadoop configuration and wordcount
Most of the reference blogs are based on Hadoop 2.x and low-level java. The configuration process seems very simple to write. Looking at other people's blogs, it feels the same steps. But there are many problems when configuring the blog: data node can't start, the page can't display properly, data node inexplicably dies, resourcemanager can't ...
Posted by dieselmachine on Sat, 18 May 2019 09:45:22 -0700
Java Written Test Common Class: Comparator Class Implements Array Sorting of Custom Objects
When writing programs or writing test papers, we always encounter classes or data structures defined by ourselves. If we put classes defined by ourselves into arrays such as List, sorting is very troublesome, such as:
A Person class is defined below.
class Person{
String name;
int age;
public Person(String name,int age) {
t ...
Posted by Octave91 on Fri, 17 May 2019 10:43:29 -0700