Build an empty project, build a main function with application, you can run the/*** Created by Robin on 15/10/11.*/public class Hello { public static void Main (string[] args) { System.out.println ("Hello"); } }Swing Replacement
1. Collection(1) Collection (single-row collection)List ( ordered, repeatable ):ArrayList: The underlying data structure is an array, query blocks, additions and deletions are slow. Thread insecure, high efficiencyVector: The underlying data
This article is a summary of the content of the article on the web to learn as well as your own little exercise, thank you for your selfless sharing.I wanted to use several random numbers in the project yesterday. As a result, random numbers appear
String literal constantStringBuffer string variables (thread-safe) When multiple threads are accessed, no problem occurs (Synchronized)StringBuilder string variables (non-thread safe) may cause problems when multiple threads are accessedBriefly, the
Premise:The elements in the list are custom objects, how can they be sorted according to the elements of the object?For example, Liststudents is a list, each element is a Student object, Student object has a member variable name,age, and so on,So I
Multithreading as a very important point of knowledge in Java, there is still a need to summarize.I. Thread life cycle and five basic statesFor the life cycle of the threads in Java, first look at this more classic diagram:Basically includes all the
These days the simple learning of Java container classes, for which they have a basic understanding and use.The container class is divided into two categories according to the number of saved objects: collection and map.The 1.Collection type, which
import java.io.file;/* * Purpose: Traverse the root directory to find all files under the. avi and. RMVB,. mp4 at the end of the disk * * 1, traversing the directory * is the file: * Judgment: * is:. avi or. rmvb or. mp4 End file, output file
1. Traversal of the Map collectionMap--Couples onIdeas:A: Bring all the husbands together.B: Walk through the collection of husbands, get every husband.C: Ask the husband to find his wife.Transformation:A: Get all the keysB: The collection of
Now the mainstream Java front-end framework is: STRUTS1,STRUTS2,SPRINGMVC and the most basic servlet;Some days ago a friend asked me this question and studied it:1. About Struts1:The Actionservlet used by Struts1 is singleton and is handled by this
Recently, the teacher assigned a task, using Java to Excel suffix named xlsx file for simple increase, delete, change, check operation; Although it is a simple program, but as I have just come into contact with some bumps. But fortunately it was
Reprinted from: http://www.cnblogs.com/dolphin0520/p/3811437.htmlAbstract is one of the most important features of object-oriented programming. In Java, there are two ways to embody the abstraction of OOP: interfaces and abstract classes. There are
Hands on the brain 1Enumeration type Gu Weihua 2015/10/3Package test2;public class Enumtest {public static void Main (string[] args) {TODO auto-generated method stubsSize S=size.small;Converting from a string to an enumerationSize
A constructor is a special method that is called automatically when an object is created in order to initialize it. The name of the constructor should match the name of the class.When objects are created, the system initializes the properties of the
1. Introduction of generics:(1) First, let's take a look at the following code, as follows:1 Packagecn.itcast_01;2 3 Importjava.util.ArrayList;4 ImportJava.util.Iterator;5 6 7 Public classGenericdemo {8 Public Static voidMain (string[] args) {
1. TreeSet Store your custom objects and traverse Exercise 1 (Natural sort):(1)Student. Java:1 Packagecn.itcast_05;2 3 /*4 * If an element of a class wants to be able to sort naturally, it must implement the natural sort interface5 */6 Public
Enumtest:Enumeration types are reference types, but small, MEDIUM, and large are not referenced by an object. An enumeration is not part of the original data type, and each of its specific values refers to a specific object, and the same value
1, Enumtest.javaSource:public class Enumtest {public static void Main (string[] args) {Size S=size.small;Size T=size.large;S and T refer to the same object? System.out.println (s==t); //is the original data type? System.out.println (S.getclass ().
1. Classes and objectsIn the object-oriented programming process, there are two important concepts: Class and Object (object, also called instance, instance), where the class is an abstraction of a batch of objects, which can be understood as a
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