1, Scope public,protected,private, and the difference when not written
Public can also refer to classes in other packages, protected are restricted to classes within the same package, private only can be used by themselves. It's the same as protected when you don't write.
The difference between
2,arraylist and Vector
ArrayList need to be predefined in size, vector not;
The
vector approach is synchronous (Synchronized), Thread-safe (Thread-safe), and the ArrayList approach is not that because the synchronization of threads necessarily affects performance, the ArrayList performance is better than vector.
when an element in a vector or ArrayList exceeds its initial size, the vector doubles its capacity, while the
The
ArrayList only increases the size of 50%, so that ArrayList is helpful in saving memory space.
is the same collection of objects, ArrayList can be checked by the compiler and the vector does not, so if you return the collection of objects with vector, the compiler is unable to find the error and can only be discovered at run time.
3. The difference between HashMap and Hashtable
The default initialization capacity of the
HashMap and Hashtable (defaults initial capacity) differs HashMap is 16,hashtable 11.
The
Hashtable is based on the old Dictionary class, and HashMap is an implementation of the map interface introduced by Java 1.2.
The method of
Hashtable is synchronous, and HashMap is not.
Can
4,char variable be defined as one Chinese? Why?
can be defined. Because Chinese is also a 16bit
5, there are several ways to express multithreading, what are all?
thread subclass and Runnable interface implement two kinds of
6. There are several ways to achieve synchronization, what are they?
one is to synchronize the method: Public synchronized methodname (...) {....}
the other is to synchronize the object (this object cannot be a null value): Synchronized (objects) {...}
7, the Inheritance time class execution order question, generally is the choice question, asks you to be able to print what?
8, how is the inner class implemented?
Inner Class "is a class declared inside another class. Starting with Java 1.1, you can declare another class in one class, which is very similar to declaring fields and methods.
9, garbage collection mechanism, how to optimize the program?
assigns a variable to NULL when it is not in use.
is
10,float float f=3.4 correct?
not. Type does not match. Change to float f=3.4f.
Two, JSP aspect
What are the built-in objects for
1,jsp? What is the difference?
What are the actions of
2,jsp?
What are the differences between the two ways of implementing
3,include?
4, what is the difference between the two modes of jump?
Three, servlet aspect
1, what is the life cycle of a servlet?
What is the difference between the
2,servlet version (which has been forgotten about the two versions)?
Four, Jdbc,jdo aspects
1 May allow you to write a JDBC Oracle-attached program.
What is the role of
2,class.forname?
What is
3,jdo?
Five, XML aspects
What are the analytical techniques for
1,xml? What's the difference?
2, what aspects of XML technology have you used in your project?
3, how do I resolve the Chinese problem when parsing an XML file with Jdom?
Six, EJB aspect
What are the contents of
1,ejb2.0? The difference between EJB2.0 and EJB1.1?
The
EJB2.0 defines three kinds of beans, Entity bean,session bean,message-driven beans.
vii. MVC Aspects
What are some of the technologies that
1,MVC to implement?
Eight, design pattern aspect:
1, which design patterns are used in development? What's the occasion?
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