Job DAY019

A, JSP short answer questions

Topic copy: The difference between the JSP include dynamic and static include the?

A: Dynamic INCLUDE when in use, will first parse the page to be included, parsed and displayed on the main page put together;
       static INCLUDE when in use, will not resolve to be included in the page

 

Two, Java short answer questions

Topic Copywriting: What is a database connection pool?

A: The database connection pool is responsible for the distribution, management and release of database connections, which allows an application to reuse an existing database connection, rather than re-create a; release the database connection idle for more than the maximum idle time to avoid because there is no release database even

Database due to the mounting connection omissions. This technology can significantly improve the performance of database operations.

 

Three, Java short answer questions

Topic Copywriting: HashMap and Hashtable difference?

answer:

1, different historical inheritance

public class Hashtable extends Dictionary implements Map
public class HashMap  extends AbstractMap implements Map

Hashtable inherited from the Dictionary class, and HashMap is an implementation of Java 1.2 introduced the Map interface.

2, different security HashMap non-synchronized, the efficiency is higher than hashTable, and HashTable is synchronized in the case of default, which means HashTable are thread-safe, multiple threads can share a HashTable; and if

If not properly synchronized, multiple threads can not share the HashMap. Java after 5 provides ConcurrentHashMap, it is an alternative HashTable better scalability than the HashTable. Of course, we can make the following ways with HashMap

step:

Map m = Collections.synchronizeMap(hashMap);

3, whether as similarities and differences between HashMap null value allows you to empty table entry as a key or value. HashMap only one record can be an empty key, but any number of entries may be empty value. That is to say, if not found in the table

Search key, or if you find the search button, but it is an empty value, get () will return null; and HashTable is not, key and value are null values ​​are not permitted.

 

Guess you like

Origin www.cnblogs.com/fighting2015/p/11361877.html