Import Java.util.Scanner;public class Calculate {public static void Main (string[] args) {TODO auto-generated Method StubScanner input = new Scanner (system.in);System.out.println ("Please enter a number (less than 5000):");int number =
1.Collections Overviewis a tool class for collection operations.What is the difference between 2.Collection and collections?Collection: Is the top-level interface for a single-column collection, and collections is a tool class for collection
Baisics:
JAVA NiO uses a channel-and buffer-based IO approach, using the native library to directly allocate out-of-heap memory ( allocateDirect ), and then operates through a directbytebuffer in a Java heap that acts as a reference to that
1. Pre-conditions
64-bit Linux operating system with Docker installed
linux operating system image
linux version of JDK compression package
linux version of Tomcat compression package
2. start the container
We don't just want to prevent a thread from using a certain state, another thread is modifying it, and we want the other thread to be able to see the change in state after a thread has modified a state.First, visibilityReorder: In the absence of
Document EventThis event is a bit special, you need to return to the document you maintain with getdocument (), and then you can add a monitor(textarea1.getdocument). Adddocumentlistener (Documentlistener Listen)There are three methods of
I. Write a simple calendar with the Calendar class of JavaPackage Com.calendar;import Java.util.calendar;import java.util.date;import java.util.gregoriancalendar;import Java.text.dateformat;import java.text.parseexception;import
Thinking question 1In the early days we often defined variables like thisint value=100;The preceding example defines the variableMyclass.obj=new MyClass ();Are the variables defined in these two ways the same?Not the same. The former defines the
* Mapping Table* Java Class Library provides two common implementations of HashMap and treemap for a mapping table* HashMap hashes the keys, treemap the elements in the overall order of the keys, and constructs them into a search tree** Similar to
[JAVA concurrent programming practices] 1. Object sharing and java practices1. Stack closures
In stack closures, objects can only be accessed through local variables.
Stack blocking refers to limiting the Declaration and Application of variables
Thinking logic of computer programs (44), thinking 44
Section 41 introduces HashSet. we mentioned that HashSet has an important limitation and there is no specific sequence between elements. We also mentioned that the Set interface has another
Cglib dynamic proxy and cglib dynamic
The proxy adds a control layer for the access object to make it indirect. The control layer can add operation properties for the object access.
Cglib: Code Generation library,
High-performance code generation
Jvm gi collector, jvmgi collection
Garbage-First is a server-side Garbage collector.
Parallelism and concurrency: Make full use of multi-core environments to reduce the pause time,
Generational collection: No need to work with other
Java concurrency tool class ForkJoin task decomposition, tool class forkjoinIntroduction to the Fork/Join framework
Step 1: Split the task. First, we need a fork class to split large tasks into subtasks. It is possible that the subtasks are still
Java concurrency deadlock instance, java dead instance
1 package com.thread.test.thread; 2 3 /** 4 * Created by windwant on 2016/6/3. 5 */ 6 public class MyTestDeadLock { 7 public void run() { 8 MyThread mt = new MyThread(); 9
Modular maven project and mavenPreface
The modularization of the project facilitates the division of tasks, post-maintenance, and easy expansion. modules can also be independently deployed as services;Create a parent project with the packaging type
Java object creation process, java object Creation
1. jvm finds the class file path.
2. The jvm loads the class file, performs static initialization, and creates a class object.
3. allocate memory space for the objects to be created.
4. clears
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