Run-time polymorphism is one of the most powerful mechanisms for object-oriented programming code reuse, and dynamic concepts can be said to be "an interface, multiple methods". The basis of Java implementation Run-time polymorphism is dynamic
Returns the local host name and IP address;InetAddress i = Inetaddress.getlocalhost ();I.gethostaddress ();//ipI.getaddress ()//???
Acquiring computer related information through computer name;InetAddress i = inetaddress.getbyname ("livingstone-pc"
If you want to know what the Java annotation is? You can look at it first: "Http://www.infoq.com/articles/Annotation-Hammer"
Here is a demo I made:
Project structure:
Operation Effect:
====================================================
Enumeration features
1. Defining an enumeration class with an enum inherits the Java.lang.Enum class by default, rather than inheriting the object class. Where the Java.lang.Enum class implements the Java.lang.Serializable and java.lang.Comparable
Recompiling a JSP does not need to restart the service period, but the class requires it.So you need to set::Add the following sentence to the Weblogic.xml file (red mark)-1ccbrootBut the disadvantage is that every time you reload all the servlet
The date class evolved from Java Development Kit (JDK) 1.0, when it contained only a few ways to get or set the various parts of a date's data, such as month, day, and year. These methods have now been criticized and moved to the Calendar class,
The example of this article for everyone to share the Java Test network connectivity methods for your reference, the specific contents are as follows
The first way: Using the Java Runtime:Java code
/** * Test Network * @param IP/private void
There is always a certain interface between modules, which can be divided into three categories: synchronous invocation, callback, and asynchronous invocation. The following focuses on the callback mechanism.
1. Overview
The callback mechanism in
One, single-threaded transformation for multithreading is also a technical work
As we can see in the mouse Uncle's blog, the original is a single-threaded application, "later, our program performance problems, so we need to become multithreaded, so,
Login Registration Small Code, will learn some of the small knowledge fused together for use, deepen the impression. In this case, if there are no details of the comments, see other blogs.
Function Introduction: Simple Login registration system,
In development, we often use database connection pool, such as DBCP database connection pool, this chapter will explain the Java Connection DBCP Database Library connection pool simple use.Development tools MYECLIPSE2014
1, first create a Web
This article crawls the link of the target website on the basis of further improving the difficulty, grabbing the content we need on the target page and saving it in the database. The test case here uses a movie download website (http://www.80s.la/)
I found a way to get the MAC address on the Internet, and I found two different methods.
First Kind
public static void Main (string[] args) throws Exception {
inetaddress ia = Inetaddress.getlocalhost ();
System.out.println (Getmacaddress
Newinstance () uses the class loading mechanism, and new creates a class.From the JVM's point of view, when you create a class using new, the class can be not loaded. However, when using the Newinstance () method, you must ensure that the class is
1. Computer systemUse caching as a buffer between memory and processor, copying the data needed for the operation to the cache, allowing for rapid computation, and synchronizing back into memory from the cache when the operation is finished, so that
This example for you to share the Java Bookstore System graduate design of the second, for your reference, the specific content as follows
1, user management (User.txt)
Field names and order
Description: the type is an int, which is used to
1. Preface
Log4j is a reliable, fast, and flexible log Framework (API) written in Java that is published under the license of Apache software. LOG4J has been ported to languages such as C,c++,c#,perl,python and Ruby.
Log4j are highly configurable
This article to undertake a previous article "Java multithreaded Examples (i)."
Four. Java multi-thread blocking state and line program control system
Several specific types of Java blocking have been mentioned above. See below for the main
Copy Code code as follows:
/*
* Test Rounding
*/
Package com.icer.test;
/**
*
* @author Hanbin
*/
public class Myround {
public static void Main (string[] args) {
Double num = 3.23562;
Double number = 0;
Number = new Myround ().
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