1. Set Frame (HashSet store string and Traverse)
A:set Collection Overview and Features
View by API
B: Case Demo
HashSet Store strings and traverse
HashSet hs = new HashSet<>();boolean b1 = hs.add("a");
1. IndentIndent with 4 spaces2. tabDo not use "hard" tab. You need to change the default configuration of the editor. Change the tab value to 4 spaces.3. Line break3.1 Line no more than 75 characters3.2 If it is too long, it can be in:
Static Import: Import static package name. Class name. static member name; tells the compiler which class the static member used in the current class imports the static package name. *; Note: Static import simplifies code writing, but results in
The previous chapter, customizing the enumeration class, is super troublesome.So, Java gives an enumeration class: Class Enum> Precautions
Defining enum classes to use the keyword enum
All enum classes are subclasses of enum
The
Reflection: The reflection mechanism of the Java language:Java reflection mechanism is in the running state, for any class, can know all the properties and methods of this class;For any object, it can call any of its methods and properties;This
Ext.: http://www.cnblogs.com/iyangyuan/p/4631696.htmlJava constant pool is a long-lasting topic, but also the interviewer's favorite, the title of a variety of, side dishes have already heard of the constant pool, this time a good summary.TheoryIt's
The class describes what the object knows and what it does!Call a method of two arguments and pass in two parametersvoid Go () {Teststuff t = new Teststuff ();T.taketwo (12,34);}void TakeTwo (int x,int y) {int z = x + y;SYSTEM.OUT.PRINTLN ("Total is"
First, basic introduction (about the following five definitions from http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/ComputerCode.html#!comments, Sheyambo master sharing)What is a machine number: A binary representation of a number in a
1. The following is correct (a)A. Formal parameters can be considered as local variableB. Formal parameters can be modified by all field modifiersC. Formal parameters are parameters that are actually passed when the method is called.D. Form
Actor class, also known as actor class, is the most basic element in LIBGDX development and can be inherited. Actor class, from the perspective of OpenGL class, can be called a two-dimensional scene node. It itself has a common approach to
As a program ape, we write code every day, but do you really know the life cycle of it? Let's talk about its life course today, say a Java Code, from birth to game over a few steps: Compile, class load, run, GC.CompileThe compilation period of the
Before we implemented the iterator pattern, many programming languages actually had built-in iterator classes, such as Java, which implemented the iterator iterator for us. We first look at the source code in iterator.Through the JDK source we found
In the actual development and application of Java projects, it is often necessary to use the basic function of converting objects to string. This article will make a summary of the common conversion methods. Common methods are object.tostring (),
1 1. Collection 2 Collection (Single-column collection)3 List (ordered, repeatable)4ArrayList5 The underlying data structure is an array, query fast, and delete slowly6 thread insecure, high efficiency7 Vector8 The underlying data
While loop and for loop two loops can be converted to one anotherLet's take a look at it by example.First example.??1.//Output 1-10public static void Main (string[] args) {int i = 0;while (true) {if (I System.out.println (i++);} else
Inheritance relationship inheritance refers to the ability of a class (called a subclass, sub-interface) to inherit the functionality of another class (called the parent class, parent interface) and to increase its own new functionality. Inheritance
Transferred from: http://jingyan.baidu.com/article/86fae346b696633c49121a30.htmlThe Java development environment is a cross-platform programming language that can be developed on Windows, Linux, and other operating systems. Small series used to do
One, the two main problems in network programmingOne is how to accurately locate one or more hosts on the network, and the other is how to reliably and efficiently transfer data when the host is found.In the TCP/IP protocol, it is mainly responsible
1. KeywordsKeywords Overview: Words that are given a specific meaning by the Java languageKeywords feature: The letters that make up the keywords are all lowercaseKeyword considerations:A) goto and const exist as reserved words and do not currently
Understanding of the volatile keyword for Java concurrency programmingEach thread in Java has its own working memory, analogous to the Processor's cache, where the Thread's working memory holds a copy of the main memory of the variable used by that
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