Last blog (http://blog.csdn.net/qq_32059827/article/details/51328638) finally on the shortcomings of the polymorphic show, here to solve this drawback. As follows:/* polymorphic Disadvantages: You cannot use the unique features of subclasses. I just
Java in the time to get the resource files, often use Class.getResource and classloader.getresource, this article to you about the two methods in obtaining resource files when the path difference.Class.getResource (String Path)When path does not
Set Map:The collection stores key-value pairs, one-to-one, and the key is guaranteed to be unique.1. AddPut (Kkey, V value)Putall (Map m)2. DeleteClear ()Remove (Object key)3. JudgingContainsvalue (Object value)ContainsKey (Object key)IsEmpty ()4.
Javaweb development, sometimes encountered statistics or management user login number or current online how many users, respectively, who is the case. Of course, there are many ways to achieve. The following is a list of statistics that are
Thread Closure If you only access data in a single-line range, you do not need synchronization, a technique known as thread closure, which is one of the simplest ways to implement thread safety. This method automatically implements thread safety
Schema: Exception Handling in Java is a kind of you throw me to pick up the schema processing method: In this method with exception handling statements to deal with, the other is to give exceptions to other methods to handleException Instance object
Serialized version IssuesBecause the object's class file must be provided when deserializing a Java object, the problem now is that the system class file will be upgraded as the project is upgraded, and how does Java guarantee the compatibility of
1. What is the API structure of the exception? What is the difference between error and exception?Throwable is the parent class of exception and error, exception is the parent of all exception classes, and error is the parent of all errors; error
Api-arrays of arraysArray to StringSet default values for all elements of an arrayArray copySystem.arraycopy--> set copy range, copy new array position usingArrays.copyof-->copy use of all contentSort arraysA) basic type--"direct useb) Reference
Java Basics:1.public static void Main (string[] args) represents the entry for the program, and the JVM starts with the above signature rulesFind (Must have public,static,void and string array as method arguments) The main method can be used
Why use Sync? Java allows multithreading concurrency control, when multiple threads concurrently manipulate a shareable resource variable (such as data additions and deletions), will result in inaccurate data and conflict with each other, so join a
Proxy pattern is a very high-usage mode:
Provides a proxy for other objects to control access to this object
The proxy mode is also called the delegate mode , which is a basic design technique
The role in proxy
Subject
Talking about the inner class, I believe that many people are not unfamiliar to him, but there are many people are not accustomed to use it, should also gradually forget him, today I will explain in detail about the concept of the inner class in
First write a person class:1 PackageLltse.base.reflectdemo;2 3 Public class Person4 {5 6 PrivateString name;7 8 PublicString GetName () {9 returnname;Ten } One A - - Public voidsetName (String name) { the
1. Operators1) Arithmetic: +,-,*,/,%,++,--2) Relationship:>,=,The result of a relational operation is a Boolean type3) Logic: &&,| |,!The logical operation is based on the relational operation,The result of the logical operation is also the Boolean
The Java input and output streams are supported by interfaces and classes under the Java.io package, and input and output are memory-divided.First, the file classThe file class is the class used in java.io to manipulate files and directories, can
Personal sense, enum class and Ordinary Java class difference is not very big, then simply recall the enumeration class1. Create an enumeration class Gender Public enum Gender { }And the common test class Gendertest Public class gendertest {}2.
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