Here are some of the more advanced questions that are rarely asked in interviews because they may shut out the interviewer. But you can find yourself some time to practice.
1. System.exit (0) skips the execution of the finally block
System.
Jce.jar
Security/us_export_policy.jar
Security/local_policy.jar
Ext/sunjce_provider.jar
These packages are loaded automatically by the Java runtime, so applications with the main function do not need to be set to the CLASSPATH environment variable.
This chapter first explains several ways to generate Java random numbers, and then demonstrates them through an example.
Overview:
What's so hard about generating random numbers here? is not the direct use of Java encapsulated a good random on the
Java Design Network Programming mode is mainly TCP and UDP two kinds, TCP is an instant communication, UDP is through the packet to communicate, UDP will be involved in the data analysis and transmission. In the security performance aspect, TCP
Summarize some ways to take Java paths Online:
Note: If you start the program from Ant, This.getclass () getresource ("") to take out the strange, directly with the Java command Line debugging can be successful.Some methods to get classpath and the
In Java, its memory management consists of two aspects: memory allocation (when creating Java objects) and memory recycling, both of which are done automatically by the JVM, reducing the learning difficulties of Java programmers and avoiding the
You may think that the program and the third party provides a lot of compression, why do you write the compression code? Yes, such as gzip a lot of compression tools, but in some cases (such as the text content is small and the characters do not
FunctionFour aspects:Definition of functionFeatures of the functionApplication of the functionOverload of a function
definition and characteristics of function1 What is a function?A function is an independent applet defined in a class that has a
1 Java.util.DateContains the year, month, day, time, minute, and second information.
Copy Code code as follows:
string is converted to date
String datestr= "2013-8-13 23:23:23";
String pattern= "Yyyy-mm-dd HH:mm:ss";
Dateformate
Objective
Java and other languages written by the program for TCP/IP socket communication, communication content is generally converted into byte an array, Java in the character and array conversion is also very convenient. Here, come with me. byte
For-each Cycle
The For-each loop is also called an enhanced for loop, or a foreach loop.
The For-each loop is a new feature of the JDK5.0 (other new features such as generics, automatic boxing, etc.).
The addition of the For-each loop simplifies
Three ways to implement multithreading in Java
In Java, there are three ways to implement multithreading. The first method: Inherit the thread class and override the run function. The second method: Implement the Runnable interface and rewrite the
Often on the go, about notify and Notifyall in Java, people often have the following statements:
Notify only notifies a waiting object, and Notifyall notifies all waiting objects, and all objects continue to run
And it seems that there are
I. The concept of generics (why generics are required)?
First, let's look at the short code below:
public class Generictest {public
static void Main (string[] args) {
list list = new ArrayList ();
List.add ("Qqyumidi");
1. Calculate the maximum number of days in a January
Copy Code code as follows:
Calendar time=calendar.getinstance ();
Time.clear ();
Time.set (calendar.year,year); Year is int
Time.set (calendar.month,i-1); Note that the
First, the use of object.tostring ()The ToString method is a public method of the Java.lang.Object object. Any object in Java inherits the object, so it is generally possible for any object to invoke the method of ToString. This is the way in which
1. How to have no locks in concurrency.A very simple idea to convert concurrency into a single thread. The disruptor of Java is a good example. If you use Java Concurrentcollection class to do, the principle is to start a thread, run a queue,
More and more projects need to use real-time message push and receive, I recommend that you use Goeasy, it is a third-party push service platform, the use of its API can easily handle real-time push!
Browser compatibility: Goeasy push supports
If you figure out the relationship between Full-width and half-width characters in Java
Then the transition between them is not a thing at all.
The relation of Full-width character and half-width character
You can use the following procedure to
With the help of Apathe's Poi.jar, the upload file does not support. jar so please download and change the file to. jar, add the Poi.jar package to the application, and put the Excel file you want to read into the root directory
This example uses
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