How to determine whether a string is a number in java
Preface
Numbers are often represented and passed by strings in certain fields.So how do we tell if a string is a number?Let's talk about this topic today.
Empty characters and null
First, it's clear that empty characters''and null are definitely not numbers.We actually write the same logic.Some of the most extreme and easily discernible logica ...
Added by sageman on Fri, 27 Sep 2019 07:56:52 +0300
JUC in-depth analysis of CAS
I. overview
CAS, Compare And Swap, that is, compare and exchange. When Doug Lea is implementing synchronous components, CAS technology is used extensively and Java multi-threaded concurrent operation is implemented artificially.
The whole AQS synchronization component, Atomic atom class operation, ...
Added by mad3533 on Wed, 25 Sep 2019 11:52:13 +0300
Java 8 Virtual Machine (JVM) Memory Overflow Actual Warfare
Preface
I believe that many senior and middle-level students in JAVA will often encounter an interview question during the interview.How do you tune and locate JVM problems in your work?
In fact, if the number of users is small and your code is normal, how can we accumulate experience in this field unless we really encounter few problems relate ...
Added by techmeister on Sun, 22 Sep 2019 15:42:54 +0300
Summary of Java lookup algorithms
Preface
Language: Java
Environment: IntelliJ IDEA
JDK Version: 1.8
Source code: GitHub
Overview of Search Algorithms and Efficiency Analysis
Algorithm name
Time complexity
Spatial complexity
Sequential search
O(n)
O(1)
Binary search
O(log2n)
O(1)
Interpolation search
O(log2(log2n))
O(1)
fibonacci search
O(log2n)
O(n)
In order t ...
Added by hexguy on Thu, 19 Sep 2019 12:48:58 +0300
LinkedList source code parsing (jdk1.8)
Preface: The source code of ArrayList is analyzed, and the reason why the average performance of inserting and deleting elements is poor is also analyzed. This introduction is more suitable for insertion and deletion of container LinkedList, of cours ...
Added by echoofavalon on Wed, 18 Sep 2019 14:36:36 +0300
Online Problem Resolver Arthas
Online Problem Resolver Arthas
BTrace was introduced before. The use of BTrace, an online problem solving tool It's also an online problem sorter.They are all artifacts, but today this is also very powerful. It's hard to say if it's more powerful, but it's very simple to use.If you're using BTrace, you need to write the probing script in advanc ...
Added by Paul Ferrie on Wed, 18 Sep 2019 04:41:22 +0300
Tomcat Service Deployment and Nginx Load Balancing Configuration
Introduction of Intermediate Key Products
At present, IBM's WebSphere and Oracle's Weblogic occupy a part of the market share of the java language Web sites. Both of these two software are commercial software, which are applied to the Web scenarios of large Internet companies due to their superior performance and high reliability.
Since versi ...
Added by friday_13 on Tue, 17 Sep 2019 15:43:06 +0300
Do you know how enumeration works?
1. Origin of Enumeration
Assume a scenario first, and now there is a requirement.You are asked to create an Employee class with an attribute role.The company has three roles: BOSS, MANAGER and WORKER.So how do we define this class? We'll impleme ...
Added by sean.mccoy on Tue, 17 Sep 2019 04:16:41 +0300
Understanding hashmap source code
ThreadLocalMap uses the open address method to solve the conflict problem, and our protagonist HashMap uses the linked list method to deal with the conflict. What is the linked list method?
data structure
In the hash table, each "bucket& ...
Added by chandru_cp on Mon, 16 Sep 2019 16:55:09 +0300
Netty Source Code Analysis--read Process Source Code Analysis
In the previous article, we analyzed the accept process in the process SelectedKey method. This article will analyze the read process in the work thread.
private static void processSelectedKey(SelectionKey k, AbstractNioChannel ch) {
final NioUnsafe unsafe = ch.unsafe();
//Check the SelectionKey Is it valid? If it is invalid, close ...
Added by mrfritz379 on Thu, 12 Sep 2019 06:47:59 +0300