1. Basic object-oriented features: encapsulation, inheritance, polymorphismJava fully supports the use of object, class, inheritance, encapsulation, message and other basic concepts to design, allowing the real world from the existence of objects (i.
Often used in development.1. Convert string to date for example "201604131630"Set Date formatPublic SimpleDateFormat SDF = new SimpleDateFormat ("Yyyy-mm-dd HH:mm:ss");Public SimpleDateFormat sdforignal = new SimpleDateFormat ("yyyymmddhhmm");String
Javasearch algorithms commonly used in--sequential lookup and binary searchFirst, sequential search:A) Principle: sequential search is in order to search from start to finish, find the data, the early end of the search, can not find the search
1. Introduction to the Singleton modeThe singleton pattern is one of the most widely used patterns, and it may be the only design pattern that many junior engineers can use. When you apply this pattern, the class of the Singleton object must
Given a linked list, swap every, adjacent nodes and return its head.For example,Given 1->2->3->4 , you should return the list as 2->1->4->3 .Your algorithm should use only constant space. Modify the values in the list, only nodes itself can be
Original address: http://www.cnblogs.com/leocook/p/log_java.htmlThe following 4 types of log management schemes are common in Java development:1. commons-logging + log4j2. log4j3. slf4j + log4j + commmons-logging4. slf4j + log4jOriginal address:
Handling of exceptions1. For exception handling, one can directly handleThe second can be thrown ,Exception/io,sql, two large classes, compiled and run-time,And the way to handle it: You can use your own defined method, or the system's1-2. The way
Click to enter _ more _java thousand ask1. What is IS-A,HAS-A,LIKE-A?In the field of object-oriented design, there are several kinds of design ideas, mainly the following three kinds:Is-a, Has-a, like-aIn Java, there are many manifests in classes,
All development teams are working on a problem by reusing code that has been tested and validated, and how to reduce development efforts. A proven approach is to optimize application development by effectively using Java inheritance. Inherited in a
Use component JList to complete the display of specified file contents with a list componentImport java.awt.*;Import Java.io.File;Import java.util.ArrayList;Import java.util.List;Import javax.swing.*;public class Liebiao extends JFrame {Private
1 How do I convert string strings to integer int?A. There are two methods:1). int i = Integer.parseint ([String]); Ori = Integer.parseint ([string],[int radix]);2). int i = integer.valueof (my_str). Intvalue ();Note: The string is converted to
Data-driven is an important part of automated testing, the data source of the scheme is also eight of flowers, such as the use of external files, directly in the @dataprovider write dead, and so on, we introduce the use of enum to do the data source,
JDK container and concurrency-Map-ConcurrentSkipListMapOverview
ConcurrentNavigableMap Based on the hop table.
1) The average time complexity of operations such as containsKey, get, put, and remove is log (n); size is not a fixed time operation. Due
Java design mode-Original Model mode and java design mode Model
Introduction
The original model mode belongs to the object creation mode. Specify the type of the object to be created through a prototype object, and then use the method of
Java Implementation of Polymorphism
Basic knowledge Review
Polymorphism, that is, overloading and rewriting. the overload occurs in a class. override occurs in the subclass, which means that the subclass overrides the method with the same name as
In a jQuery ajax request, HttpServlet Returns [HTTP/1.1 405 Method not allowed], jqueryhttpservlet
1. ProblemsWhen jQuery ajax is used to request a Servlet, the success callback function that does not enter ajax is returned, and the browser console
Concurrent Programming-object combination and concurrent programmingObject combination 1. Design thread-safe classes
1. In the process of designing the thread security class, it should include the following three basic elements:
1) Find all the
Java concurrent programming Series 29: correct termination and restoration of threads (continued)
Recognition interruption
Previously, in the correct termination and recovery Thread article, we introduced the interrupt method of the Thread class and
Preliminary Research on concurrent programming-object sharing and concurrent programmingObject sharing 1. Visibility
In the absence of synchronization, the compiler and runtime may make some unexpected adjustments to the execution sequence of the
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