1. Error description
Serious: Servlet.service () for Servlet [SPRINGMVC] in context with path [/cmp] threw exception [filtered request failed.] Root cause java.io.OptionalDataException at java.io.ObjectInputStream.readObject0
The first kind of,list, list when using set to go heavy, without rewriting the Equals method
list list = new arraylist ();for (int i = 0; i List.add (i);}List.add (3);List.add (5);for (int m = 0; m System.out.println ("The contents of the list is:" +
Directory
1Java Operation Database Java operation database The first method Queryrunner method of Java Operation database
1. Java Operation Database
How to store the data crawled by the crawler is also a problem before our attention, the common
Topic Description
All numbers in an array of length n are in the range of 0 to n-1. Some of the numbers in the array are duplicates, but there are several numbers that are not known to be duplicates. Nor do we know how many times each number
The difference between class hashset and class linkedhashset in Java
Class hashset This class implements the set interface, supported by a hash table (which is actually a hashmap instance). It does not guarantee the iteration order of the set,
1 class notepad{2 private K key;3 private V value;4 Public K Getkey () {5 return key;6 }7 Public void Setkey (K key) {8 this.key = key;9 }Ten public V GetValue () {one return value;The }The
Java Why to single inheritance, many implementations, summed up as follows:
For multiple inheritance, when there are duplicate properties or methods in more than one parent class, the invocation result of the subclass is ambiguous and therefore a
in JDK1.4
Map map = new HashMap ();Iterator it = Map.entryset (). iterator ();while (It.hasnext ()) {Map.entry Entry = (map.entry) it.next ();Object key = Entry.getkey ();Object value = Entry.getvalue ();}
JDK1.5, the application of new
While looking at the Hadoop in action, there was an error in the HDFs operation where the transcription code Putmerge to eclipse
Wrong Fs:hdfs://192.168.96.131:9000/user/hadoop, expected:file:/
Then, the Internet to look up the error, said that the
public class Person {
Public String name= ' person ';
int age=0;
{
System.out.println ("Initialization block:" +name);
Name = "InitBlock";
System.out.println ("Initialization block:" +name);
}
Public person () {
Name=
First, single selection
1. What happens when you try to compile and run the following program ()
Class a{
public int GetNumber (int a) {
return a+1;
}
}
Class B extends a{
public int GetNumber (int a, char c) {
return a+2;
}
public static void Main (
definition: encapsulates a series of object interactions with an intermediary object that allows each object to interact with each other without the need to be displayed, thus loosening the coupling and independently altering the interaction between
Declaration, memory allocation, and initialization of Java variables
Class person
{
String name;
int age;
void talk ()
{
System.out.println ("I am: +name+", this year: "+age+");
}
public class Testjava2_1
{public
Static sort APIs in the 1,arrays class
The sort in Arrays.sort (int[] a) is a quick sort, with a time complexity of O (NLOGN)
Arrays.sort (t[],comparator C) uses a merge sort, and the merge sort is stable , arranged in natural order when C=null
1. Receive a character from the console
This method can only get one character, cannot get other data types, and generally does not use 2 to receive a string from the console
This method can only receive strings from the console, not other data
Java Summary of the first lesson
Overview
The Java language, a new programming language introduced by Sun in 1995, is a cross-platform, purely object-oriented language suitable for distributed computing environments.
Jvm:java virtual
Jar version: Java.lang.UnsupportedClassVersionError: Hu Jintao
Cause of the errorThe version inconsistency of Java used in compiling Java and running Java is caused;SolutionsModify the Java version of the running environment or modify the Java
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