, the Java Virtual machine is divided into 3 partial classloader, the runtime data area5 x Memory Space1. Stack: Store local variables2. Heap: Store all new things3. Method area: Class information loaded by the virtual machine, constants, static
Deploying Machines
Operating system: CentOS 7
Java Edition: Java version "1.7.0_80"
Problem symptoms
A Java Web program deployed on two identically configured servers (server 1, server 2), the program started normally, the
1. Reference counting methodThis is an old and classic garbage collection algorithm whose core is to add 1 when the object is referenced by others, minus 1 when the reference is lost. There are very serious problems with this approach: there is no
public class Singletondemo {public static void main (string[] args) {singleton.getsingle (); Singleton.getsingle ();}} Class singleton{//creates a singleton class/object created by the class itself//private static SingleTon SingleTon = new SingleTon
The Java reflection mechanism allows us to obtain bytecode for any class at runtime (runtime) outside of the compile period (Compile time). Includes interfaces, variables, methods, and so on. You can also let us instantiate the object at run time,
Wrapper class--is the upgrade of the underlying data typeBecause of the limited ability of basic data types, the basic data types are encapsulated as classes--wrapper classesWhat is a regular expression?One sentence: a ruleThe regular expression can
1. Class loading Subsystemis responsible for loading class information from the file system or network, and the loaded information is stored in a memory space called the method area.2. Method areaStoring class information, constant information,
1. Minimize the try block as much as possible2. Use the Finally keyword to ensure that all resources are released correctly3. The catch statement should try to specify the specific exception type, not one exception to handle all possible exceptions4.
The concept of the Java event delegation mechanism, where a source generates an event and sends it to one or more listeners. In this scenario, the listener simply waits until it receives an event. Once the event is accepted, the listener handles the
Java's method for calculating the string length and understanding of u4E00 and u9FBB, u4e00u9fbbWhen a string is encoded in unicode mode, the length of the string is calculated to locate the range represented by Chinese Characters in UNICODE
Operation notes of the jsch package
Use jsch class package to operate xshell
The Code is as follows:
Package com;
Import java. io. IOException;Import java. io. InputStream;Import java. util. ArrayList;Import java. util. List;Import java. util.
Servlet case 6: display the user's last access time and servlet's last access
Here is a simple cookie Application
Tell the user that your last access time is: xxxx-xx: xx
Ideas:
When you access the website for the first time, record the current
(2) Web application architecture and web application architecture
Container
Servlet does not have the main () method. They are controlled by another Java application. This Java application is called a Container ). The most common tomcat is such
SpringMVC integrates Shiro Security Framework (2), springmvcshiro
1. Authentication
Identity Authentication, that is, who can prove in the application that he is himself. It generally provides some identification information such as their ID to
Java learning notes day01 and learning notes day01
This note records the features, usage, and other features of the Java language that you have never met when learning the C language.
1. Common doscommands
Cd .. return to the parent directory
Static code block, construction code block, construction method execution sequence, static Construction
Construct code blocks, static code blocks, and constructor methods are three different code blocks. What are the differences between
Reflection of Java basics and java reflection
The reflection library provides a rich and well-designed set of tools to write programs that can dynamically manipulate Java code. Programs capable of analyzing class capabilities become reflection ).
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