Situation one: Java.lang.OutOfMemoryError:Java heap spaceCause: The Java heap is running out of memory, may be really inadequate, or it may be a dead loop in the programScenario: 1, Tuning JVM parameters-xms2048m-xmx2048m2. Locating the Dead Loop
Concept: In Java, the singleton pattern is a common design pattern, and the singleton pattern is divided into three kinds: lazy type single case, a hungry man type single case, registration type single case three kinds.There are a few features of
public class User implements Serializable {}When a client accesses a resource that can turn on a session, the Web server creates a HttpSession object corresponding to that client, and each HttpSession object consumes some memory space. If there is a
When creating a multithreaded programming, we often implement the Runnable interface, runnable no return value, to get the return value, JAVA5 provides a new interface callable, can get the return value of the thread, but to get the return value of
In concurrent programming, there are two key issues that need to be addressed: how to communicate between threads and how threads are synchronized. Communication refers to how information is exchanged between threads, and in imperative programming,
Annotations is tags that I insert into your source code so that some tool can process them. The tools can operate on source level or they can process class files to which the compiler has placed annotations.Uses for annotations:
Automatic
Interface runableProperties: TargetMethod: void Run ()Class ThreadMethod: void Start () is used to start a threadMethod to execute after the void run () thread startsSting GetName ()void SetName (String)Thread CurrentThread () returns a reference to
It was always said that bulk INSERT and update efficiency is higher than non-bulk, but has not used the bulk processing of data, and now because the project needs to deal with a large amount of data, so the use of bulk processing features, Java code
20165308 "Java program Design" 9th Week study summary Textbook Learning content Summary 13 Chapter Knowledge Summary get Address 1. Get the address of a host on the Internet
can use the static method of the InetAddress class Getbyname
I. The concept of reflectionThe Java reflection mechanism is in the running state, for any class, can know all the properties and methods of this class, for any one object, can call any of its methods and properties; This dynamically acquired
1. ArraysConcept: A linear collection of stored elements.Array Declaration and creation:new datatype[arraysize];Two-dimensional array (multidimensional array) Declaration and creation:new datatype[arraylenght1][arraylenght2];PS: The array length
requirement One : analog computer motherboard , mouse and keyboard are plugged in the motherboard, for data interactionimplementation One : In the Install method of the motherboard class, the incoming type is written dead, which prevents the
The 13th chapter of textbook Learning Content-
Problems in teaching materials learning and solving problems in debugging process code and solving process thinking and understanding code hostingSee Code Cloud: Code Cloud
First, the textbook study note ch131. URL class
The URL class is an important class in the java.net package, where an instance of the URL encapsulates a uniform Resource locator, and the application that uses the URL to create the object is
in a campaign to facilitate the exchange of information, our reconnaissance department set the key heights of the campaign to (X=0,y=0) and stipulates that each eastward increase -meters,xPlus1, each northward increased -meters,yPlus1. At the same
One, the same pointare used to compare values or objects.Two, different pointsfor "= =", for the base type (Char,byte,short,int,long,float,double,boolean), the comparison is the value, so is equal, for the reference object, compared to the
Dynamic AgentJdk1.3 only the introduction of dynamic agent mechanism, can be run again, for the corresponding interface (must have interface) dynamically generated corresponding proxy objectBased on the above problems, we can encapsulate the
1. Import the Scanner classImport Java.util.Scanner;Class testif{public static void Main (String [] args) {Create a Scanner objectScanner Scanner = new Scanner (system.in);3. Get the integer enteredSystem.out.print ("i =");int i = Scanner.nextint ();
, synchronous asynchronous, blocking non-blocking (not very clear at the moment, this blog after the completion of the post-processing)1. Synchronous and asynchronous: Focus on the communication mechanism of the message,Synchronization: After a call
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