Preface:Read the 1th rule of the book when you feel that this is a very good book, we can improve the Java foundation of a grade, I still more recommended. This blog is for "effective Java" this book 2nd Chapter wrote a reading note. In the blog
Java does not support generic arrays. Other words[Java]View Plaincopy
list[] ls = new arraylist[10];
is not supported, and[Java]View Plaincopy
list[] ls = new arraylist[]
But you can.Yes, I'm not sure. Why can't I
1) Now there are T1, T2, T3 three threads, how do you ensure that the T2 after the T1 execution, T3 after the implementation of T2 execution?This thread problem is usually asked during the first or phone interview phase to detect whether you are
This is one of the 5 things series articles from the IBM Developerworks in the Ted Neward, which describes some of the application tips for the Java Concurrency Collection API that you
Network : Linking computers from different regions to a LAN, metropolitan area network, internetIP address : Each device in the network will have a unique digital ID is the IP address, one IP address can correspond to multiple domain names, a domain
Output an array of elements that we usually do with a for loop, such as: Package test; Public class Test { publicstaticvoid main (String args[]) { int arr[]={1,2,3}; System.out.print ("["); for (int i=0; i)
1, download (page HTML), request header (such as user-agent) processing, redirection, timeout, agent, retry policy, etc.1) Using URL implementations in the JDKHttpURLConnection con = url.openconnection ()2) using the Apache project HC Implementation
Preface : Java is often used in a single case, today found that they have a little new understanding.Lazy Single-case PackageCom.mwq.singleton; Public class Singleton1 { Private Singleton1() { }Private StaticSingleton1 single =NULL; Public
ImportJava.io.File;Importjava.io.FileNotFoundException;ImportJava.io.PrintStream; Public classIptest { Public Static voidMain (string[] args) {/*Long IP = Getip2long ("10.0.35.120"); SYSTEM.OUT.PRINTLN ("IP-to" +IP); Long ip2 =
What is the essence of enumerations?Enumerations inherit the Enum class, each member of an enumeration type is declared as public static final, each of which is a single instance of that type, and each object in the enumeration is an enumeration of
Causes the Java.lang.OutOfMemoryError:Java heap space exception, which may be caused by the Java stack setting being too smallThere are two ways to solve these questions on the Internet:1. Join at the front of the
identifier DefinitionRecognize Java identifiers in programming languages, identifiers are words that the programmer himself prescribes, such as class names, attribute names, variable names, and so on.Q: Is the identifier God horse?A: Identifiers are
People who use Excel often should know that excel2007 and above can easily store millions data, but how large amounts of data in the system can be quickly and accurately imported into Excel this seems like a challenge, for the general web system, we
The difference between equals and = = in JavaThe data types in Java can be divided into two categories:1. The basic data type, also known as the original data type. Byte,short,char,int,long,float,double,booleanThe comparison between them, applying
XML parsing Method 1. Sax parsing MethodsSAX (simple API for XML) is an alternative to XML parsing. Compared to Dom,sax is a faster and more efficient method. It scans the document row by line, parsing while scanning. And you can stop parsing at any
I. Overview1. Application of Bridge Mode: (1) two dimension extension (2) permutation combinationSecond, the Code1.gift.java1 Public class Gift {23 protected Giftimpl Giftimpl; 4 }2.giftimpl.java1 Public class Giftimpl {23 }3.warmgift.java1
After alert, you can continue to execute subsequent code. alert continues to execute
If the code is executed after alert under normal circumstances, solution: use setTimeout to delay the code to be executed (cause: the page has not been
Java basics: abstract classes and interfaces
I. Introduction
Based on the following two principles in the five object-oriented principles, we should consider using interfaces and abstract classes:
Lee's replacement principle:Subclass can replace 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