java written Guinness Collection

2009-06-17  来源:本站原创  分类:Java  人气:675 

This article is part of my summing up, attachment containing the full content, please download
java written Guinness Collection

1. (&,|,^) Logical operation on the operation and conditions (&&,||) difference. (15 points)
A major difference between two points:
a. the conditions of operation can only Boolean operations, and logic operations can not only Boolean operations, and can operate numerical
b. does not produce short-circuit logic operation. such as:
int a = 0;
int b = 0;
if ((a = 3)> 0 | | (b = 3)> 0) / / fuck after a = 3, b = 0.
if ((a = 3)> 0 | (b = 3)> 0) / / fuck after a = 3, b = 3.
The correct answer to the first point was 5 minutes, the correct answer to the second point 10 points.
The study questions the most basic knowledge, but still has a lot of great cow horses class developers, in any language at the beginning of the
Will introduce a detailed knowledge of these basic, but a language apart from the first study, no one at the time to learn new languages are willing to spend about five minutes to review.
2. The following program is running what will happen? If there is an error, how to correct? (15 points)
interface A (
int x = 0;
class B (
int x = 1;
class C
extends B implements A (
public void pX () (
System.out.println (x);
public static void main (String [] args) (
new C (). pX ();
The title will happen at compile-time error (an error description of the JVM have different information, which means x is not specific to call, both x are matched at the same time as import java.util and java.sql packages both directly Statement Date the same as)
The title of the main types of study on the interface and the most basic understanding of the structure. The parent variables can be used to super.x
Clear, and the implied default interface for the property public static final. So to clear by Ax.

3. On Java Server Page and Servlet and the difference between the contact. (20 points)
Needless to say the title, at the same point A should be made clear is compiled jsp know "category servlet" and "is not a Servlet",
A distinction should be answered when the "focus on the (view / control logic)." Addition and subtraction of other scores, under the circumstances. Knowledge is very simple,
However, from the perspective of the interview, subjects not only want to know the difference between them, and to be able to more accurately express
(After writing the document to allow other people can read, no ambiguity), answered "jsp is compiled servlet" as wrong,
Jsp to answer for the view, servlet is used to control logic "as a mistake, should be focused on the main (majority) for the words to express.

4.XML There are several forms of the definition files? What is the nature of the distinction between them?
Analysis of XML documents which have a number of ways? (20 points)
Answer this question in three points:
a: two forms of dtd, schema
b: the essential difference between: schema is xml, the XML parser can resolve (this is from the DTD on the fundamental purpose of development schem)
c: in two main ways: dom, sax. For a whole two hours out of the , if For the saxt , or other (in For the dom , sax base
On the basis that if the candidate can also consider other means of analysis as xml should be allowed. The answer but there is no dom , sax put the other way as the analysis of XML shall be sub-) should add points.

5. Java.util.concurrent.locks.Lock on synchronized and the similarities and differences? (15 points)

The same major points:
Lock can be synchronized to complete implementation by all the features. (The other is not important)
The main different points:
Lock there is more precise than the synchronized thread semantics and better performance (at the same point in the answer to this point will do)
release lock automatically synchronized. and Lock must request the release of programmers manual. and must be finally clause
Release, if there is no finally released at The answer shall not sub . Such as Connection on Medium NOT turn off at the same finally. Even the most basic resources are released to do well, talk about multi-threaded programming.

EJB specification 6.EJB provisions prohibiting the operation of what has? (15 points)
A total of 8 points, 3-4 points following a Lay out .

1. Can not operating threads and thread API (thread API refers to non-thread objects such as notify, wait, etc.)
2. Awt should not operate
3. Not the server function
4. Can not Survive on a static check.
5. IO operation can not use direct access to file system
6. Can not load the local library.
7. Can not be this as a variable and return.
8. Can not call cycle.

71, on the similarities and differences between synchronized and java.util.concurrent.locks.Lock?
Main the same point: Lock can be synchronized to complete implementation by all the features of the main differences: Lock there is more precise than the synchronized thread semantics and better performance. will be automatically synchronized to release lock, and requires programmers to hand-Lock must release, and must be released in the finally clause.

72, EJB object, and three of the role of a complete EJB-based distributed computing architecture composed of six roles, the role of these six can be provided by different developers, each role must be followed by the job provided by Sun EJB specification to ensure compatibility between. This

Six roles are: EJB Component Developer (Enterprise Bean Provider), the application of combination of those (Application Assembler), the deployment of those (Deployer), EJB server provider (EJB Server Provider), EJB container provider (EJB Container Provider) , the system administrator (System Administrator)
Three targets: Remote (Local) interface, Home (LocalHome) interface, Bean Class

73, EJB container provided by the main provider of Service statement
Cycle management, code generation, continuity management, security, transaction management and distributed management of locks and other services.

74, EJB in the EJB specification provisions which prohibited the operation?
1. Can not operating threads and thread API (thread API refers to non-thread objects such as notify, wait, etc.),
2. Should not operate awt,
3. Not the server function,
4. Can not Survive on a static check,
5. IO operation can not use direct access to file system,
6. Can not load the local library.,
7. Can not be this as a variable and return,
8. Can not call cycle.

Java written summary of the topic (1-75)
Object-oriented features of what has ()
(1) abstract:
Abstract is a neglected subject in the current goal has nothing to do with those aspects in order to more fully with the current attention to aspects of the goal. Abstract does not intend to know all the questions, but only one of the select part of some of the details of the moment do not have. Two aspects of the abstract, including, first, the process of abstraction, data abstraction Two.
(2) Succession:
Linked inheritance is a kind of hierarchical model, and permit and encourage the kind of reuse, it provides a clearly stated common methods. A new type of object can be derived from existing classes, this type of process is known as succession. New class inherits the original class identity, a new category known as the original type of derived class (subclass), while the original category as a new type of base class (parent class). Derived class can see from its inherited base class methods and instance variables, and categories can be modified or new methods to make them more suitable for the needs.
(3) package:
Package is put together to surround the process and data, access to data only through defined interfaces. Object-oriented computing began in the basic concept of the real world can be portrayed as a series of full self-government package of objects, these objects through a protected interface to access other objects.
(4) polymorphism:
Polymorphism refers to permit different types of objects to respond to the same message. Including parametric polymorphism and inclusion polymorphism polymorphism. Polymorphism flexible language, abstract, behavior sharing, code-sharing advantages of good application function to solve the problem of the same name.

2, String is the most basic data types ? ?
Basic data types include byte, int, char, long, float, double, boolean and short.
final category is the type of java.lang.String, and therefore can not inherit this class should not change the category. Improve efficiency in order to save space, we should use the StringBuffer Class

3, int and Integer What is the difference between
Java offers two different types: reference types and primitive types (or built-in type). Int is the original java data type, Integer is a java package provided for the int type. Java primitive types for each category provided a package.
Original type of package type
Quote original type and type of behavior is totally different, and they have different semantics. Original type of reference type and have different characteristics and usage, they include: the size and speed, this type of data structure the type of storage, when the original type and the type of reference for an example of a data type specified in default values. Object reference instance variables of the default value is null, while the original type of the default values instance variables with their type.

4, String and StringBuffer difference
JAVA platform provides two classes: String and StringBuffer, which can be stored and operation of the string that contains a number of characters in character data. The String class provides a numerical string can not be changed. The StringBuffer class provides for modification of the string. When you want to change the character data to know when you will be able to use StringBuffer. Typically, you can use to dynamically StringBuffers character data structure.

5, run-time anomalies and anomalies of the similarities in general?
Anomaly that is running that may occur in irregular status, run-time anomaly that is usually a virtual machine operation that may be encountered in the abnormal operation is a common error. java compiler must request a statement that may arise out of non-run-time anomaly, but does not require a statement has not been caught out run-time anomaly.

6, say Servlet life cycle, and tell the difference between Servlet and CGI.
Servlet instantiated by the server, the container is running its init method, arrive at the request of the service method of operation, service operation and methods of automatically sending the corresponding request doXXX method (doGet, doPost) and so on, when the server decided to call the instance when the destruction of its destroy method.
The difference is that with cgi server process in a servlet, it runs through the many threads of its service method, an example can be served on a number of requests, and the examples of the general will not be destroyed, and CGI requests are generated for each new process services after the completion of the destruction, so the efficiency is lower than on servlet.

7, to say ArrayList, Vector, LinkedList and storage performance characteristics
ArrayList and Vector are stored using an array of data, the number of array elements is greater than the actual data stored in order to increase and to insert elements, which are indexed by serial number to allow the direct elements, but want to insert elements in the array elements involved in mobile operations, such as memory, so index data quickly and slowly insert the data, Vector methods because of the use of a synchronized (thread-safe), usually more on the performance of ArrayList bad, and the use of two-way linked list LinkedList implementation to store, index data required by the serial number before or after the traverse , but only need to insert the data before and after record of this can be, so insert faster.

8, EJB technology is based on the implementation of what? And SessionBean and EntityBean tell the difference, StatefulBean and StatelessBean difference.
EJB including the Session Bean, Entity Bean, Message Driven Bean, based on JNDI, RMI, JAT, such as technology implementation.
SessionBean at J2EE applications are used to achieve a number of server-side operations, such as access to the database, call other EJB components. EntityBean application system is used to represent the data used.
For the client, SessionBean is a non-persistent objects, which achieve some running on the server business logic.
For the client, EntityBean is a persistent object, it represents a memory stored in the persistent entities in the target view, or an existing enterprise applications from the physical implementation.
Session Bean can also be subdivided into Stateful Session Bean and Stateless Session Bean, both the Session Bean can be placed on the system logic of the implementation method, unlike the Stateful Session Bean can record the caller's status, it is often to Say, a user will have a corresponding entity of the Stateful Session Bean. Stateless Session Bean Components While the logic is, but he did not record the user is responsible for status, that is to say when a user calls a Stateless Session Bean time, EJB Container will not find a specific entity of Stateless Session Bean to implement this method. In other words, it is possible a number of users in the implementation of a methods of Stateless Session Bean, the Bean will be the same in the implementation of the Instance. From memory point of view, Stateful Session Bean and Stateless Session Bean comparison, Stateful Session Bean consume more J2EE Server memory, however, the advantage of Stateful Session Bean is that he can maintain the user status.

9, Collection and the Collections of the difference.
Collection is a collection of superior class interfaces, inheritance and his main interface has Set and List.
Collections is a collection of class categories assist, he provided a series of static methods of implementation of various collections search, sort, such as thread-safe operation.

10, & & & and distinction.
& Is an operator, and express bitwise operations is a logical & & operator, the logic and express (and).

11, HashMap, and the difference between Hashtable.
HashMap is a lightweight implementation of the Hashtable (non-thread-safe implementation), they achieve the Map interface, the main difference is that HashMap permit space (null) key (key), because of the non-thread-safety, efficiency may be higher than on Hashtable.
HashMap allows null as a key or entry of value, while Hashtable does not allow.
Contains the HashMap Ways Hashtable put away, replaced by containsvalue and containsKey. Since it contains could easily lead to misunderstanding.
Dictionary inherited from Hashtable class, and the introduction of the HashMap is Java1.2 a Map interface implementation.
The biggest difference is that, Hashtable is to Synchronize, and not a HashMap, Hashtable visit more than one thread at the time, Do not need their own methods for its implementation synchronization, and the HashMap must provide external synchronization.
Hashtable and HashMap using the hash / rehash algorithm are approximately the same, so there will be no significant performance differences.

12, final, finally, finalize the distinction.
final statement for the property, methods and types of property that can not be changed, methods of non-coverage, type can not be inherited.
finally exception handling statement is part of the fabric that is always the implementation.
finalize is a method of Object class in the implementation of the garbage collector will be called when the object was the recovery of this method, you can override this method to collect waste from other resources at the time of recovery, such as the closure of files.

13, sleep () and wait () What is the difference?
sleep is a type of thread (Thread) method, cause this thread to suspend the specified period of time, give the opportunity to put the implementation of other threads, but still maintain the status monitor to automatically restore after. Call sleep will not release the object lock.
wait is the Object class methods, call the wait method on this object cause the object to give up the thread lock, enter the Wait for lock Wait for the object pool, the only issue for this object notify method (or notifyAll) only after the thread locking the object into the pool get ready to enter the running state of the object lock.

14, Overload and the difference between Override. Overloaded methods can change the type of return value?
Ways to rewrite the Overriding and overloading Overloading is the Java performance of the different polymorphisms. Overriding is the father of re-writing classes and subclasses of a performance between the polymorphism, overloading Overloading is a category of a manifestation of polymorphism. If the definition of a sub-class methods and his father have the same type name and parameters, we say that the method has been rewritten (Overriding). Subclass of the object using this method will call the definition of sub-category, it is concerned, the definition of the parent category as the "shielding" the. If a class is defined in a number of methods of the same name, they have different parameters or the number of parameters or have different types, overloaded methods are called (Overloading). Overloaded methods can change the type of return value.

15, error and exception What is the difference?
Recovery error that is difficult but not impossible situation of a serious problem. For example, memory overflow. Procedures can not be expected to deal with such circumstances.
exception that a design or implementation problem. In other words, it means that if run properly, the situation never happened.

16, the similarities and differences between synchronous and asynchronous, under what circumstances to use them separately? Example.
If data will be shared between threads. For example, after data is written in another thread may be read, or read data is likely to have been written by another thread, then the data is shared data, access must be synchronized.
When an application object at a call on a long time required to implement the methods, procedures and do not want to wait for the return method, it should use the asynchronous programming, in many cases the use of asynchronous channels are often more efficient .

17, abstract class and interface What is the difference?
Ways exist without a statement to the implementation of its type to be called abstract class (abstract class), it used to want to create a manifestation of certain basic types of behavior, and such statements, but should not at this kind of implementation of such situation. Can not create instance of abstract class. However, you can create a variable, its type is an abstract class, and make it point to a specific sub-category of a case in point. Constructor should not have an abstract or abstract static methods. Abstract class for their sub-class of the parent class implementation for all abstract methods, they also for the abstract class. Instead, in the sub-class implementation of the method. Know that their behavior can be other types of class implementation of these methods.
Interface (interface) is a variant of abstract class. Interface, all methods are abstract. Many can be inherited through the realization of this interface and access. All interface methods are abstract, there is NOT a procedure body. Interface can only be a member of the definition of static final variables. Interface is similar to sub-class implementation and, in addition to the type of implementation should not inherit from the interface definition of behavior. When a special type of interface implementation, it is the definition of (the procedure body is about to give) all of the methods of this interface. And, it can achieve at the interface of any object on the method call interface. Because there is an abstract category, which allows the use of interface name as the reference variable type. The usual dynamic binding will take effect. Reference can be converted to the interface type, or conversion from interface type, instanceof operator can be used to decide whether a particular object class implementation of the interface.

18, heap and stack What is the difference between.
Stack is a linear collection of elements to add and delete operations should be completed in the same period. LIFO stack in accordance with the manner of treatment.
Reactor is an integral element of the stack

19, forward and redirect the difference between
forward the request of the server resources, server direct access to the destination address of URL, put the contents of the URL to read from the response, and then re-issued to put the content browser, the browser did not know the content server from where, and so It's the address bar or the address of the original.
Service-side redirect is based on logic, send a status code, go tell the browser to request the address, the browser will generally just re-request all the parameters of the request, so session, request parameters are available.

20, EJB and JAVA BEAN difference?
Java Bean is a reusable component, the Java Bean does not strictly regulated, in theory, any Java type can be a Bean. However, under normal circumstances, because of Java Bean container is created (such as Tomcat), so Java Bean should have a constructor without parameters, In addition, Java Bean are also Serializable interface implementation for the implementation of the Persistent Bean. Java Bean in fact equivalent to Microsoft's COM model of the local process COM components, it is a cross-process should not visit. Enterprise Java Bean is equivalent to DCOM, or Distributed Component. It is based on Java's Remote Method Invocation (RMI) technology, can be so EJB remote access (inter-process and inter-computer). But the EJB must be deployed in such Webspere, WebLogic containers such, EJB client never really direct access to the EJB component, but the container through its visit. EJB containers EJB agent components, EJB components created by the container and management. Customers through the container to access the EJB components really.

21, Static Nested Class and different Inner Class.
Static Nested Class declaration is static (static) internal class, it can not rely on an external instance of a class that was instantiated. Usually required at the internal-type external type instantiated instantiated before.

22, JSP dynamic INCLUDE and INCLUDE the difference between static?
INCLUDE with dynamic jsp: include action to achieve <! - Include file = "included.htm" ->

23, when using assert.
assertion (that) in software development is a common way of debugging, a lot of languages support the development of such a mechanism. In the implementation of, assertion is a statement of procedures, which check a boolean expression, a process must be right to ensure that the value of the boolean expression for the true; if the value is false, that procedures have been incorrect in the status , the system will give warning or quit. Generally speaking, assertion assurance procedures for the most basic, the key is correct. assertion checks are usually in the development and testing open. In order to improve performance after the software release, assertion checking is usually turned off.

24, GC What? Why should there be a GC?
GC is the meaning of garbage collection (Gabage Collection), memory programmers to deal with is prone to place the question, forget the wrong memory or recovery process or system would lead to instability or even collapse, Java functions can be provided by automatic monitoring GC whether over scope so as to achieve the purpose of automatic recovery of memory, Java language does not provide the release of the show have been allocated to the memory operation.

25, short s1 = 1; s1 = s1 + 1; there is nothing wrong? Short s1 = 1; s1 + = 1; there is nothing wrong?
short s1 = 1; s1 = s1 + 1; (s1 +1 computing result is type int, the type cast required)
short s1 = 1; s1 + = 1; (can compile right)

26, Math.round (11.5) equal the number of? Math.round (-11.5) equal the number of?
Math.round (11.5) == 12
Math.round (-11.5) ==- 11
Ways round back with the parameters of the nearest long integer, parameter add 1 / 2 for the floor.

27, String s = new String ( "xyz"); the creation of a number of String Object?
Two (one is "xyx", refers to a "xyx" a reference to the object s)

28, the design of four threads, each thread of one of two j increased by 1, and the other two threads to reduce the one-per-j. Written procedures.
The following types of implementation procedures for the use of the internal thread of j does not take time to change the order of questions.
public class ThreadTest1 (
private int j;
public static void main (String args []) (
ThreadTest1 tt = new ThreadTest1 ();
Inc inc = Inc ();
Dec dec = Dec ();
for (int i = 0; i <2; i + +) (
Thread t = new Thread (inc);
t.start ();
t = new Thread (dec);
t.start ();
private synchronized void inc () (
j + +;
System.out.println (Thread.currentThread (). GetName ()+"- inc: "+ j);
private synchronized void dec () (
j -;
System.out.println (Thread.currentThread (). GetName ()+"- dec: "+ j);
class Inc implements Runnable (
public void run () (
for (int i = 0; i <100; i + +) (
inc ();
class Dec implements Runnable (
public void run () (
for (int i = 0; i <100; i + +) (
dec ();

29, Java has no goto?
reserved word in java, there is no use in java.

30, start a thread is run () or start ()?
Start a thread that calls start () method, so that the thread represented by the virtual processor can run in the status, which means that it can by scheduling and implementation of JVM. This does not mean that the thread will run immediately. run () method must have exit signs to stop a thread.

31, EJB, including (SessionBean, EntityBean) to tell me their life cycle, and how to manage the affairs?
SessionBean: Stateless Session Bean life cycle is determined by the container when the client sent a request to create a When Bean instance, EJB containers do not have to create a new instance of the Bean for the client to call, but is not looking for a Some examples provided to the client machine. When the first client to invoke a Stateful Session Bean, the container must immediately on the server to create a new instance of the Bean, and related to the client, the client machine after the Stateful Session Bean calls the methods of the container will be assigned to this call Client Bean associated examples.
EntityBean: Entity Beans can be a relatively long survival time and status is a continuous process. As long as there is data in the database, Entity beans have survived. Rather than in accordance with the application process or the Service. Even if the collapse of the EJB container, Entity beans are also survival. The life cycle of Entity Beans or Beans can be to manage the container.
EJB technology management practices through the following: Object Management Group (OMG) Practice of Object Services (OTS), Sun Microsystems of the Transaction Service (JTS), Java Transaction API (JTA), Development Group (X / Open) the XA interface.

32, application server, have those?
BEA WebLogic Server, IBM WebSphere Application Server, Oracle9i Application Server, jBoss, Tomcat

33, I give you the most common to see a runtime exception.
ArithmeticException, ArrayStoreException, BufferOverflowException, BufferUnderflowException, CannotRedoException, CannotUndoException, ClassCastException, CMMException, ConcurrentModificationException, DOMException, EmptyStackException, IllegalArgumentException, IllegalMonitorStateException, IllegalPathStateException, IllegalStateException, ImagingOpException, IndexOutOfBoundsException, MissingResourceException, NegativeArraySizeException, NoSuchElementException, NullPointerException, ProfileDataException, ProviderException, RasterFormatException, SecurityException, SystemException, UndeclaredThrowableException, UnmodifiableSetException, UnsupportedOperationException

34, Whether or not inheritable interface interface? Abstract class can achieve (implements) interface? Abstract class is inheritable entity class (concrete class)?
Interface interface can be inherited. Abstract class can be achieved (implements) interface, abstract class is inheritable entity class, but only entity class must have a specific constructor.

35, List, Set, Map Whether or not inherited from the Collection interface?
List, Set is, Map is not

36, out of the job data connection pooling mechanism?
J2EE server startup will set up a certain number of pool connections, and has been maintained at not less than the number of connection pool. Necessary to connect the client program, the pool will return a driver not used to connect the pool table and recorded as busy. NOT free if the current connection pool drivers on a certain number of new connections, new connection configuration parameters decided by the quantity. When using the pool to connect calls after the completion of this connection pool driver table entry for free, other calls can use this connection.

37, abstract whether the method is also static, it also is a native, it also is synchronized?
Can not

38, the array has no length () this method? String has no length () this method?
NOT array length () this method has the property length. Has String has length () this method.

39, Set in the element should not duplicate, then the method used to distinguish whether or not duplicate it? Is == or equals ()? What is the difference between them?
Set in the element should not duplicate, then using iterator () method to distinguish whether or not duplicate. equals () is the interpretation of both Set Whether or not the same.
equals () and == means to determine whether the reference point to the same target value equals () has been covered in class in order to separate two objects when the content and the type of match, then return true value.

40, whether the constructor Constructor can be override?
Constructor constructor can not be inherited, we can not rewrite Overriding, but can be overloaded Overloading.

41, whether the String type can be inherited?
String is the final category can not inherit it.

42, swtich it up to the role of the byte to see if it can function at long on, whether on the role of the String?
switch (expr1) Medium, expr1 is an integer expression. Therefore passed to the switch and case statement should be the parameters int, short, char or byte. long, string can not act on the swtich.

43, try () where there is a return statement, then immediately after the try in the finally () in the code will be executed, when executed, before or after in return?
Will be implemented prior to the implementation of the return.

44, the programming problem: with the most efficient way to calculate the equal number of 8 multiplied by 2?
2 <<3 (there is a background C programmers ask this question in particular likes)

45, two targets of the same value (x.equals (y) == true), but may have a different hash code, this sentence right?
No, there is the same hash code.

46, when an object as parameter to a method, this method can change the properties of this object, and return the result of the changes, then in the end here is the transfer value or reference?
Is passed by value. Java programming language, only the value of transmission parameters. When an object instance as a parameter is passed to the method, the parameter is the object. The contents of the object can call the method was changed, but the object reference will never be changed.

47, when a thread access to an object method of a synchronized, other threads can access to other methods of this object?
Can not, an object of a synchronized method can only be visited by a thread.

48, program title: Writing out a Singleton.
Singleton pattern is to ensure a major role in the Java application, a class that there is only one instance of Class existence.
Singleton pattern in general usually have several in various forms:
The first is: the definition of a class, its constructor is private, and it has a static type of the private variable initialization in the class instance, then through a public access to the getInstance method to quote it, and then one of the method call.
public class Singleton (
private Singleton () ()
/ / In their own internal definition of an example, is not it strange?
/ / This is private for the attention of internal calls
private static Singleton instance = new Singleton ();
/ / Here for external access to a static method of this class, you can directly access
public static Singleton getInstance () (
return instance;
The second form of:
public class Singleton (
private static Singleton instance = null;
public static synchronized Singleton getInstance () (
/ / This method is an improvement over the above, need not be generated each time the object is first
/ / Used to generate examples of efficiency!
if (instance == null)
instance = new Singleton ();
return instance;)
Other forms:
The definition of a class, its constructor is private and all methods of static.
The first is generally considered more secure to some

49, Java interface and C + + of the same type of virtual and differences.
Because Java does not support multiple inheritance, and there is probably a category or object to be used separately or in some object inside the method or property, the existing single-inheritance mechanism can not meet the requirements. Compared with the inheritance, interfaces, there is greater flexibility, because there is no interface implementation code. When a class implements the interface after the implementation of such interfaces to which all of the methods and property, and property inside interface default status in all the following public static, default, all methods are public. A class can achieve a number of interfaces.

50, Java's exception handling mechanism and application of a simple principle.
When the JAVA program in violation of the rules of JAVA semantic, JAVA virtual machine errors will be expressed as an exception. Violation of semantic rules, including two kinds of situation. JAVA class library is built-in semantic checks. Such as cross-border array subscript will trigger IndexOutOfBoundsException; access null object will trigger NullPointerException. In other cases, the expansion of JAVA programmer to allow inspection of such semantics, programmers can create their own unusual and freedom to choose when an exception is raised using throw keyword. All exceptions are subclasses of java.lang.Thowable.

51, the benefits of recycling trash and principles. And to consider two kinds of recovery mechanisms.
Java language in a prominent feature of this approach is the introduction of garbage collection mechanism to enable c + + programmers most of the memory management headaches solved the problem, it allows Java programmers to write programs at a time when memory management is no longer considered necessary. Because there is a garbage collection mechanism, Java objects no longer have "scope" concept, only the object reference will have no "scope." Recycling trash can effectively prevent the memory leak, an effective use of available memory. Recycling garbage is usually as a separate low-level thread to run, under unforeseen circumstances heap memory or have died a long time the object does not use clear and Recycling, programmers should not call the real-time garbage collector for all objects in an object or carry out waste recovery. Recovery mechanisms have a copy on behalf of Recycling and Rubbish Recycling garbage tags, incremental garbage collection.

52, please say you know the method of thread synchronization.
wait (): make a thread in a wait state, and the release of the object held by a lock.
sleep (): make a thread that is running in a sleep state, is a static method, call this method Abnormal InterruptedException want to capture.
notify (): wake up a thread in a wait state, noted that calls this method at the time, and should not wake up the exact status of a thread to wait, but by the JVM to determine which thread to wake up, and not by priority class.
Allnotity (): Wait for wake-up call to the status of all Department of the thread, wake-up call to all the attention is not an object of thread lock, but allow them to compete.

53, you know what type of collection? The main method?
A collection of the most common category is List and Map. List the specific implementation, including ArrayList and Vector, they are a list of variable size, more suitable for construction and operation of any type of storage element of a list of objects. List numerical index for the visit by the case element.
Map provides a more common method of storage elements. Map collection class used to store the elements of (referred to as the "key" and "value"), one of each key is mapped to a value.

54, describe the JVM to load the principle mechanism for class file?
JVM in the class is loaded by the ClassLoader and its subclasses to the implementation, Java ClassLoader is an important component of Java run-time system. It is responsible for search and at run-time type of documents into categories.

55, char-type variables can be stored in a Chinese character? Why?
English can be a definition, because the java in unicode encoding, accounting for a 16-byte char, so English is not putting a question of

56, multi-threaded implementation has several methods, what is? Realize there are several methods of synchronization, what is?
Multi-threaded implementation, there are two methods, namely the implementation of succession with the Thread Class Runnable interface
Synchronized, there are two aspects of implementation, which are synchronized, wait and notify

57, JSP's built-in objects and methods.
request that the HttpServletRequest object. It includes the browser requests the information, and provides for access to some cookie, header, and session data useful.
response that the HttpServletResponse object, and provides for some browser settings back to the method of response (such as cookies, header information, etc.)
out object is an instance of javax.jsp.JspWriter and offers several ways for you to return to the browser output.
javax.servlet.jsp.PageContext express a pageContext object. It is used in a variety of areas to facilitate access to space first name, servlet-related objects of the API, and packaging of the generic servlet-related functions.
express a session object javax.servlet.http.HttpSession request. Session can store the user's status information
javax.servle.ServletContext express a target applicaton. This will help search on the servlet engine and servlet environment information
javax.servlet.ServletConfig express a config object. The target for access to servlet instance initialization parameters.
page that the page generated from the example of a servlet

58, the basic concept of threads, thread status as well as the basic relationship between the status
Thread refers to the process of implementation in the process, be able to implement a code of implementation units, each process has a thread at least, that is, the process itself.
Java has four kinds of threads in the status are: running, ready to hang, The End.

59, JSP common commands

isErrorPage (Whether or not to use Exception object), isELIgnored (Whether or not lose sight of the expression)

"Target =" _blank "> http:// ......"%>

60, under what circumstances to call doGet () and doPost ()?
Jsp page in the form tag to get the property when the method call doGet (), for the post when the call doPost ().

61, servlet life cycle
web container load servlet, start the life cycle. By calling the servlet's init () method to initialize the servlet. By calling the service () method implementation, in accordance with the request calls for a different way to do ***() different. The End Services, web container servlet calls the destroy () method.

62, how the reality of the single-threaded model servlet

63, page transmission method between the object
request, session, application, cookie, etc.

64, JSP and Servlet which have the same point and the different points of contact between them is what?
JSP is an extension of Servlet technology, in essence, is the easy way to Servlet, more emphasis on the appearance of the application of the expression. After the JSP compiler is a "category servlet". Servlet and JSP The main difference is, Servlet's application logic in the Java file, and that entirely from the HTML layer in the separation. JSP is the Java and HTML can be combined into one extension. Jsp document. JSP focuses on the view, Servlet mainly used for control logic.

65, four session tracking technology
Page description of the session scope ServletsJSP
on behalf of any page with a page-related objects and property. A page compiled by a Java servlet class (can include with any instructions, but did not include action) said. This includes both servlet and compiled into a servlet, including the JSP page
is the request on behalf of the client and the Web of a request issued by the relevant objects and property. A request is likely to span multiple pages, involves a number of Web components (because of forward motion instructions and include the relationship between)
is the session on behalf of and for a client of a Web user experience related to objects and property. A Web session can often be carried over a number of client requests
is the application on behalf of the entire Web application-related objects and property. This is essentially across the entire Web applications, including multiple pages, requests and the overall scope of a conversation

66, Request object's main method:
setAttribute (String name, Object): Set the name of the request for the name of the parameter values
getAttribute (String name): return name specified by the value of property
getAttributeNames (): return request the names of all the attributes of the object collection, the result is an example of enumeration
getCookies (): return of all client-side Cookie object, the result is an array of Cookie
getCharacterEncoding (): return the request character encoding
getContentLength (): return the length of the request of the Body
getHeader (String name): the definition of access to HTTP protocol header information
getHeaders (String name): Name of the designated return all the request Header value, the result is an example of enumeration
getHeaderNames (): return the request Header Name so, the result is an example of enumeration
getInputStream (): return the request input stream for the data access request
getMethod (): access to server-side client to send data
getParameter (String name): send it to the client access to server-side there is the name of the parameter values specified
getParameterNames (): access to the client send to server-side the names of all the parameters, the result is an example of enumeration
getParameterValues (String name): access to the specified name has all the values of the parameters
getProtocol (): access to the client to transmit data to the server-side protocol is based on the name of
getQueryString (): access to query string
getRequestURI (): string of a request to obtain the client address
getRemoteAddr (): access to the IP address of the client
getRemoteHost (): access to the client's name
getSession ([Boolean create]): return and request the relevant Session
getServerName (): access to the server's name
getServletPath (): Client-side access to the requested script file path
getServerPort (): access to the server port number
removeAttribute (String name): delete the request of a property

67, J2EE is a technology or platform or framework?
J2EE is a standard, a distributed application for enterprise development of the standard platform.
J2EE is a framework, including JDBC, JNDI, RMI, JMS, EJB, JTA, etc. techniques.

68, at our web application development process often encountered in the output of a character encoding, such as iso8859-1, such as how to output a certain string encoding?
Public String translate (String str) (
String tempStr = "";
try (
tempStr = new String (str.getBytes ( "ISO-8859-1"), "GBK");
tempStr = tempStr.trim ();
catch (Exception e) (
System.err.println (e.getMessage ());
return tempStr;

69, on the logic of operation and conditions of operation (&,|,^) distinction (&&,||).
A major difference between two points: a. the conditions of operation can only Boolean operations, and logic operations can not only Boolean operations, and can operate numerical
b. the operation does not produce short-circuit logic

70, XML documents have some form of definition? What is the nature of the distinction between them? Analysis of XML documents which have a number of ways?
a: two forms dtd schema
b: the essential difference between: schema is xml, the XML parser can resolve (this is also the schema from the DTD on the development of the fundamental purposes)
c: there is DOM, SAX, STAX, etc.
DOM: document deal with large-scale decline in the performance very much. This problem is caused by the DOM tree structure created by this structure occupy more memory, and the DOM document must resolve before the entire document into memory, suitable for the Random Access XML
SAX: not now on the DOM, SAX is event-driven XML-based analytical methods. It order to read XML documents, do not need to load the entire file all at once. When the document as the beginning of the end of the document, or tag at the beginning and the end tag, it will trigger a case, the user callback in his case in writing code to deal with deal with XML documents, XML-fit of the sequential access
STAX: Streaming API for XML (StAX)
the definition of xml document, there are two methods:
dtd: the definition of data types (data type definition), to describe the document structure of XML documents is the definition of an early form of XML documents.
schema: its own XML-based language, and grammar at the type and on the limited capacity of dtd, and treatment is also quite convenient, as this is gradually replaced by a new model dtd definition language.

71, on the similarities and differences between synchronized and java.util.concurrent.locks.Lock?
Main the same point: Lock can be synchronized to complete implementation by all the features
The main difference: Lock there is more precise than the synchronized thread semantics and better performance. will be automatically synchronized to release lock, and requires programmers to hand-Lock must release, and must be released in the finally clause.

72, EJB and the role of the three objects
A complete EJB-based distributed computing architecture composed of six roles, the role of these six can be provided by different developers, each role must be followed by the Sun's EJB specification offers so as to ensure mutual compatibility. The six roles are developer EJB components (Enterprise Bean Provider), the application of combination of those (Application Assembler), the deployment of those (Deployer), EJB server provider (EJB Server Provider), EJB container provider (EJB Container Provider) , the system administrator (System Administrator)
Three targeted Remote (Local) interface, Home (LocalHome) interface, Bean Class

73, EJB container services
The main provision of the statement cycle management, code generation, continuity management, security, transaction management and distributed management of locks and other services.

74, EJB in the EJB specification provisions which prohibited the operation?
1. Can not operating threads and thread API (thread API refers to non-thread objects such as notify, wait, etc.), 2. Should not operate awt, 3. Not the server function, 4. Can not Survive on a static check, 5. IO operation can not use direct access to the file system, 6. Can not load the local library., 7. can not be this as a variable and back, 8. Can not call cycle.

75, remote interface and home interface a major role
remote interface defines the business methods for the EJB client calls business methods.
EJB Factory home interface is used to create and remove EJB search examples

76, bean instance for the life cycle of Stateless Session Bean, Entity Bean, Message Driven Bean exist buffer pool management in general, and for the Entity Bean and Statefull Session Bean exist Cache management, usually to create instances, set the context, the creation of EJB Object (create) business method call, remove, etc., exist for the management of buffer pool Bean, in the example does not create, after removal from the memory, instead of using the buffer pool reuse scheduling mechanisms instance, Cache management for existence through the activation of the Bean and go activation mechanism to maintain the status Bean and limit the number of memory instances.

77, EJB activation mechanism to Stateful Session Bean as an example: the size of the Cache memory can decide the existence of the Bean at the same time the number of instances, in accordance with MRU or NRU algorithm, examples go in the activation and transfer between the activation status, the activation mechanism is when EJB client calls a business method of example, if the corresponding EJB Object not found itself bound Bean instance from the corresponding activation of the Bean store go (through the mechanism of storage sequence examples) reply (activated) in this example. Changes in status before calling the corresponding method ejbActive and ejbPassivate.

78, EJB types of conversation
(Session) Bean, Entity (Entity) Bean-driven message (Message Driven) Bean Session Bean has status can be divided into (Stateful) and status (Stateless) can be divided into two entities Bean of Bean managed persistent (BMP) and the sustainability of container managed (CMP) in two

79, customer service call EJB client object some basic steps
Factory set up JNDI and JNDI Service System Service Address property,
Home search interface, from the Home interface methods call Create to create Remote interface,
Remote interfaces through its business method calls.

80, how to specify the size of the memory weblogic? At Weblogic startup script (in which the corresponding Domian server directory startServerName), increased set MEM_ARGS =- Xms32m-Xmx200m, can adjust the minimum memory for the 32M, the largest 200M
81, how to configure weblogic for the hot start mode (development mode) and product release mode?
Management Console can be modified at the corresponding server model for the development of start-up mode or one of Products. Services start-up or modify a document or documents commenv to increase the set PRODUCTION_MODE = true.

82, how to start, is not required to enter a user name and password?

Service startup files modified to increase the item WLS_USER and WLS_PW. documents can also be added in the encrypted user name and password.

83, Taichung at weblogic management of an application domain (or a website, Domain) for jms and ejb or connection pool configuration and other related information, the actual documents stored in what?

Domain at the preservation of the config.xml file, which is the core of the server configuration file.

84, to talk about weblogic a Domain default directory structure?
Such as to a simple directory helloWorld.jsp Add to Ho, but it's up in the browser can break into the host: port number / / helloword.jsp can be seen on the results? Also used such as this one of a their Writing the javaBean how to do?
Domain Directory directory server applications, the directory will be applied on this directory as the application will be able to visit, in the case of Web applications, application directory to meet the necessary requirements of Web application directory, jsp files can be applied directly on the directory, Javabean required on the application directory WEB-INF directory of the classes directory, set the default application server will be able to achieve in your browser without input on the application name.

85, ejb in weblogic to be involved in the release to which different types of configuration files involved in the EJB configuration file is different from all involved, including the configuration file ejb-jar.xml, weblogic-ejb-jar.xmlCMP Entity Bean are generally required weblogic - cmp-rdbms-jar.xml

86, How to configure weblogic in ssl client authentication configuration, or to talk about j2ee (standard)

Ssl configuration to use the default installation DemoTrust.jks KeyStore implementation DemoIdentity.jks and SSL, need to configure the server using the Enable SSL, configure the ports, in the product model required to obtain from the CA private key and digital certificate, create identity and trust keystore, loading access to the keys and digital certificates. SSL can be configured to connect this is a one-way or two-way street.

87, How do I view weblogic has been released at the EJB? Can use the Management Console, the Deployment at it can see all of the published EJB88, CORBA is about? What is the purpose?

CORBA standard is CORBA (Common Object Request Broker Architecture), by the Object Management Group (Object Management Group, the acronym for the OMG) standardization. It is composed of the Interface Definition Language (IDL), language bindings (binding: Binding also translated), and permit inter-application protocol interoperability. Its purpose is: to use a different programming language written in a different process to run different operating systems development.

89, like you are familiar with or have heard of several of the j2ee common mode? And design patterns for some of the views of
Session Facade Pattern: use SessionBean visit EntityBeanMessage Facade Pattern: Asynchronous call EJB Command Pattern: Use Command JavaBeans replace SessionBean, lightweight implementation visit Data Transfer Object Factory: through the DTO Factory simplify data EntityBean characteristics Generic Attribute Access: through the interface AttibuteAccess EntityBean provide features to simplify data Business Interface: the adoption of long-range (local) interface and achieve the same category Bean Interface Specification EJB business logic consistency of the design of mixed architecture will directly affect the system performance, scalability, maintainability, reusable components and development efficiency. The more complex the project, the project team can be more substantial the more the importance of good design.

90, to talk about at weblogic developed persistent message with Bean at the time of the difference between non-persisten

persistent approach to ensure that the MDB message transmission reliability, which is a problem if the EJB container and JMS message server will still be available at this time MDB sent, and the mode of non-persistent message will be discarded.

91, Servlet implementation of some general methods which achieve?

public void init (ServletConfig config)
public ServletConfig getServletConfig ()
public String getServletInfo ()
public void service (ServletRequest request, ServletResponse response) public void destroy ()

92, j2ee design patterns commonly used? Factory model description.
23 kinds of Java design patterns:
Factory (Factory Mode), Builder (construction mode), Factory Method (Factory Method Pattern), Prototype (original model for model), Singleton (Example single mode), Facade (window mode), Adapter (Adapter mode), Bridge (bridge mode), Composite (synthesis mode), Decorator (decorative patterns), Flyweight (Flyweight pattern), Proxy (proxy mode), Command (command mode), Interpreter (interpreter mode), Visitor (visitor pattern), Iterator ( Iterative sub-model), Mediator (mediator model), Memento (memorandum mode), Observer (Observer Pattern), State (status mode), Strategy (Strategy pattern), Template Method (Template Method Pattern), Chain Of Responsibleity ( duty chain model)
Factory Pattern: Factory pattern is a frequently used mode of implementation according to the type of factory pattern can be generated based on data provided by a group of categories instance of a class, this group usually have a common type of parent and abstract Ways to achieve the same, but these methods for different data from different operational. First need to define a base class, the subclass of such different ways through the implementation of the method of base class. Then necessary to define a factory class, factory class can be generated in accordance with the conditions of examples of different subclasses. When the received subclass instance, the developer can call the base class method in the back in the end without having to consider which of the examples of sub-categories.

93, EJB need to achieve its business directly or Home interfaces interface ? , please brief reasons.
Remote interface and Home interfaces do not have a direct implementation, and their implementation code is generated by the server, run the corresponding type of implementation as an example of the corresponding interface type being used.

94, which has several ways to sort? Please list.
A fast implementation using JAVA sort.
Sort by:
Insertion Sort (Direct Insertion Sort, sorting Hill),
Exchange sort (bubble sort, quick sort),
Sort selection (direct selection sort, heap sort),
Merge sort
Distribution sort (sort boxes, sort the base) of the pseudo-code to sort Express.
/ / Use the quick sort method for a [0: n-1] sorted from a [0: n-1] to select an element as a middle, the fulcrum of the elements for the remaining two elements divided into left and right, make left elements are less than or equal to the fulcrum, and the right elements are greater than or equal to the fulcrum of the use of recursive quick sort method to sort of left recursive quick sort method to use to sort the results right to left + middle + right

95, requested the following in terms commonly used in J2EE to explain (or a brief description)

web containers: one of give in the application components (JSP, SERVLET) to provide an environment in which the JSP, SERVLET direct more containers interactive interface of the environment variables, other systems do not have to concern about the problem. WEB server to the main implementation. For example: TOMCAT, WEBLOGIC, WEBSPHERE, etc.. Interface of the container provided by strict compliance with the J2EE specification standards in the WEB APPLICATION. We comply with the above criteria to the WEB server on the WEB called J2EE container.
EJB container: Enterprise java bean container. More characteristics of industries. Available to him to run one of the components in a variety of management functions EJB. As long as the specifications meet the J2EE Add EJB to the container, the container will be carried out immediately and efficient management. And can be off-the-shelf system-level interface to access services. Services such as e-mail, transaction management.
JNDI: (Java Naming & Directory Interface) JAVA naming directory service. The main functions provided are: a directory system that allows other applications around the left at the top of their index, in order to meet the fast search and location functions of distributed applications.
JMS: (Java Message Service) JAVA message service. Achieve all the major communication between applications. Including point-to-point and broadcasting.
JTA: (Java Transaction API) JAVA Affairs Service. Distributed Transaction Service provides. Simply call the application's interface can be provided.
JAF: (Java Action FrameWork) JAVA framework for security authentication. Provide a framework for security control. Allow developers through a variety of deployment and achieve their own custom personalized security control strategy.
RMI / IIOP: (Remote Method Invocation / internet protocol Object Request Broker) that they are mainly used for long-distance calls through the Service. For example, there is a remote on a computer running a program, which provides stock analysis services, we can achieve on the local computer to its direct call. Of course, this is the norm to be adopted must be at between heterogeneous communication systems. RMI is a unique JAVA.

96, JAVA language how to deal with abnormal,
Keyword: throws, throw, try, catch, finally what is the point on behalf of? In the try block can be thrown ? ?
Java through the object-oriented approach to exception handling, and a variety of abnormal classification, and provides a good interface. In Java, each object is an anomaly, it is the Throwable or other examples of sub-class. When a method after unusual throw an exception object, the object contains unusual information, call the methods of this object can be captured and deal with this anomaly.
Java exception handling through the five words to achieve the: try, catch, throw, throws and finally. Under normal circumstances, try to use a section of procedures for implementation, if there is abnormal, the system will be thrown out (throws) an exception, this time you can type to capture it (catch) it, or the last (finally) from the default processor to deal with. Used try to specify all the prevention of an "abnormal" procedures. Try the procedure followed at the back of a catch clause should be included to specify you want to capture the "abnormal" type. throw statement to explicitly throw an "abnormal." throws to a member function marked out the various possible "abnormal." Finally a section of code to ensure that no matter what "abnormal" has been the implementation of a section of code. Members in a function call outside the try to write a statement, in the members of the internal function try to write another statement to protect other code. Whenever there is a try statement, the "abnormal" on the stack on the framework above, until all have completed the try statement. If you try the next level of a statement is not "abnormal" to deal with, the stack will be carried out until the deal has encountered this kind of "unusual" statement of the try.

97, a ". Java" Whether or not the source of the document can include a multitude of categories (not an internal category)? What are the limitations?

Can . Must be only one type of the same name and file name.

98, MVC are those of the various parts of technology to achieve? How to achieve?
MVC is the Model-View-Controller's abbreviated. "Model" represents the application business logic (via the JavaBean, EJB component implementation), "View" is the application of the express Noodles (generated by the JSP page), "Controller" is to provide the treatment process control applications (usually a Servlet ), through the application of this design model logic, process and display the logic implementation is divided into different components. These components can interact and reuse.

99, java There are several ways in the implementation of a thread? What is synchronized keyword used methods modified? Stop () and suspend () methods are not recommended?

There are two methods of implementation, namely the type of inheritance with the Thread interface Runnable implementation modified to use the keyword synchronized synchronization object to the use of stop (), because it is unsafe. It will obtain the lifting of all by the thread locked, and if the object is not in a coherent state, then the other threads in the kind of state inspection and modify them. The results of the really difficult to detect where the problem lies. suspend () method of deadlock-prone. Calling suspend (), the aim will be to stop the thread, but I still hold in this lock before. At this point, other threads can not access any resources locked, unless the "hang" restore the thread to run. To any thread, if the goal they want to restore the thread, at the same time, a lock attempt to use any resources, it will cause a deadlock. Therefore should not use suspend (), but should be in their own class into the Thread a sign that the thread should be suspended or activity. If the signs pointed out that the threads should be hung, they use wait () Wait for order status to enter. If the signs pointed out that the thread should be restored, then a notify () to restart the thread.

100, java are several types of flow? JDK for each type of flow provided for the succession of abstract class, please state what type they are?

Byte streams, character streams.
Byte streams inherited from InputStream OutputStream,
Succession in the character stream InputStreamReader OutputStreamWriter. package have at lot of other streams, mainly in order to improve performance and ease of use.

101, java memory leak will exist ? , please briefly describe. Will. Such as: int i, i2; return (i-i2); / / when i was a big enough positive number, i2 negative for large enough. The results would cause overflow, resulting in an error.

102, java implementation of multi-state mechanism is all about?
Ways to rewrite the Overriding and overloading Overloading is the Java performance of the different polymorphisms. Overriding is the father of re-writing classes and subclasses of a performance between the polymorphism, overloading Overloading is a category of a manifestation of polymorphism.

103, garbage collector of the basic principles of what? Recycling trash can immediately recall memory ? ? Is there any way to take the initiative to inform the virtual machine garbage collection? GC for example, when a programmer to create object, GC will start monitoring the object's address, size and usage. Usually, GC has to plan the use of recording and management of the heap (heap) of all objects. In this way the object to determine which is "accessible" and which is "not accessible." When the GC to identify the object as "not up to" when, GC has the responsibility to recall these memory space. Can . Programmers can manually perform a System.gc (), notify the GC to run, but the Java language specification does not guarantee that GC will be the implementation.

104, static variables and instance variables of the difference? static i = 10; / / Constants class A a; ai = 10; / / variable

105, what is java serialization, how to sequence implementation of java?

Serialization is a stream object used to deal with the mechanism, the so-called object flow object that is streaming the content. Convection can be carried out after the object to read and write operation can also be the subject of flow after the network transmission. Sequence is the target in order to address the flow of read and write operation to the questions raised.
Sequence of implementation: The need to be sequence of implementation of the class Serializable interface that does not achieve the necessary methods, implements Serializable only in order to mark the object is serialized, and then use an output stream (such as: FileOutputStream) to construct a ObjectOutputStream (object stream) object, then, the use of the ObjectOutputStream object writeObject (Object obj) method parameters can be the object obj to write (that is, to preserve its status), it is necessary to restore, then the input stream.

106, whether from a static method of the internal issue of non-static method call?
Can not, if the object contains one of the method (); can not guarantee that the object is initialized.

107, Writing clone () method, usually single line of code, what? Clone has the default behavior, super.clone (); he is responsible for producing the right size space, and of each copy.

108, in JAVA, how to get out of their present multi-nested loop?

With break; return method.

109, List, Map, Set of three interfaces, access element, what the characteristics of each?
List in order to hold a particular element can have duplicate elements. Set can not have duplicate elements, the internal sort. Map the value of key-value preservation, value may be multi-valued.

110, J2EE what?
J2EE is Sun's multi-company (multi-diered), distributed (distributed), based on the components (component-base) of the enterprise-level application model (enterpriese application model). In such an application system, in accordance with the function divided into different components, these components can be on different computers, and at the corresponding level (tier) Medium. Including their level of customer layer (clietn tier) components, web tier and components, Business layer and components, enterprise information system (EIS) layer.

111, UML modeling language aspects of the standard UML.
Use case diagram, a static map (including class diagram, object diagram and package diagram), behavioral maps, interactive map (sequence map, co-operation plan), implementation plans.

112, say a number of commonly used type, package, interface, please cite the five commonly used categories:
BufferedReader BufferedWriter FileReader FileWirter String Integer
Commonly used packages: java.lang java.awt java.util java.sql
Commonly used interface: Remote List Map Document NodeList

113, the development of all those design patterns used? With what occasions?

Each model are described in a U.S. environment in the emerging problem, and then describes the solution of the problem's core. In this way, many times you can use those existing solutions, the need to duplicate the work of the same. The main use of the MVC design pattern. Used to develop JSP / Servlet application or the relevant J2EE. Factory mode easy.

114, jsp which there is action? Separately what role?

JSP total of the following six kinds of basic action
jsp: include: the requested page at a time when the introduction of a document.
jsp: useBean: find or instantiate a JavaBean.
jsp: setProperty: setting the JavaBean property.
jsp: getProperty: output property of a JavaBean.
jsp: forward: a request to put a new page.
jsp: plugin: In accordance with the type of browser plug-ins for the Java generated OBJECT or EMBED tag.

115, Anonymous Inner Class (anonymous inner class) it can extends (inheritance) to other categories, it can implements (implementation) interface (interface)?

Other types can be inherited or achieve other interfaces commonly used in the swing this way of programming.

116, application server and the difference between WEB SERVER?

Application Server: Weblogic, Tomcat, JbossWEB SERVER: IIS, Apache117,

BS and CS in contact with the distinction.
C / S and B / S contact:
C / S is a Client / Server abbreviation. High-performance servers are typically the PC, workstation or minicomputer, and the use of large-scale database systems such as Oracle, Sybase, Informix or SQL Server. Client need to install special client software. B / S is the Brower / Server acronym, as long as the client is installed on a browser (Browser), such as Netscape Navigator or Internet Explorer, the server is installed Oracle, Sybase, Informix or SQL Server and other databases. In this structure, the user interface through the WWW browser fully realize, at the front part of business logic implementation, but the main business logic in server-side implementation. Browser through the Web Server with the database for data exchange.

C / S and B / S distinction:
1. Hardware environment is different: C / S at the exclusive use of the general set up networks, where small-scale network environment, LAN between the servers through dedicated connections and data exchange services. B / S on the set up in the wide area network, and do not have to be dedicated network hardware environment, for example, Internet and telephone, rental of equipment. information to manage. there is more than C / S range of adaptability, as long as there is the general operating system and browser on the line
2. Safety requirements of the different C / S for the general user base is relatively fixed, the information capacity of a strong safety control. Generally highly classified information system C / S structure appropriate. By B / S part of publicly released information. B / S in the wide area network set up on the weaker safety control, possible for the unknown users.

3. Procedural framework for the different C / S program can pay more attention to flow, you can check on the multi-level permissions, the system can be run at less consideration. B / S on the security and access speed of the multiple considerations, set up in the need for more basic optimization above. than the C / S have higher requirements for B / S structure of the program is the development trend of architecture, from the MS's. Net series, such as BizTalk 2000 Exchange 2000, a comprehensive network of support structures of the components of the system. SUN and IBM pushed The JavaBean component technology, so that B / S more sophisticated.
4. Software reuse in different C / S can be considered holistic inevitable, as reusable components in the B / S under the requirements of good reuse of components. B / S of the multi-structure, the requirements of the function of relatively independent components. Be able to relatively better reuse. on the table can be purchased to re-use, rather than make a stone wall at the table
5. Maintenance of different C / S because of the overall process, must be inspected, as well as deal with problems of system upgrade. Upgrading difficult. May be a completely new system to do B / S Component composition, aspects of the replacement of individual components, systems implementation seamless upgrade. to minimize system maintenance costs. users download from the Internet to install on their own can achieve the upgrade.
6. Questions deal with different C / S program can deal with customers face fixed, and in the same region, the safety requirements of the high demand associated with the operating system. The system should be the same B / S based on wide-area network, for different user groups, distributed area, which is C / S can not be a position to do so. relations between the minimum and operating system platforms.
7. User interface of different C / S was set up many on the Window platform, the performance of methods is limited, to programmers in general require a higher B / S on in your browser set up, there is more rich and vivid expressions communicate with the user. And most of the difficulty of reduce, reduce development costs.
8. Information flow in different C / S procedure is a typical example of the centralization of power in general mechanical treatment, interactive relatively low B / S to change the flow of information, BB BC BG and other information, the flow changes, like trading center.

118, LINUX under the thread, GDI-type explanation.

LINUX is based on the implementation process of the core lightweight "one-on-one" thread model, a thread corresponding to a core entity lightweight process, and thread management between the outer function in the nuclear implementation library.
GDI graphics device type for library programming interface.

119, STRUTS application (such as STRUTS architecture)
Struts is Java Servlet / JavaServer Pages technology, the development of Web applications, open-source framework. Able to issue the use of Struts-based MVC (Model-View-Controller) framework for the application of design patterns. Struts has the following main functions:
1. Contains a controller servlet, the user's request can be sent to the Action object.
Two. JSP freely tag libraries, and associated controller servlet to provide support to help developers create interactive application form.
Three. To provide a series of useful objects: XML processing, through the Java reflection APIs automatically deal with JavaBeans property, and prompted an international message.

120, Jdo what?

JDO is a Java Object Persistence of new norms for the java data object referred to, is a data warehouse for access to certain objects in the standardization of the API. JDO provides transparent object storage, and therefore developers, the stored data objects do not need extra code (such as the use of JDBC API). These tedious routine work has been transferred to the JDO product providers who allow developers out in order to focus time and energy on the business logic. In addition, JDO is flexible because it can run on any of the underlying data. JDBC is oriented relational database (RDBMS) JDO more common to provide any data to the bottom of the storage function, such as relational databases, files, XML and object-oriented database (ODBMS) and so on, making applications more portable.

121, contains an internal type can quote him a member of Class ? ? There is no limit?
An internal type of object it can access to create the content of external class object

122, WEB SERVICE Glossary.

Introduction JSWDL development package. JAXP, JAXM explanation. SOAP, UDDI, WSDL explained.

Web ServiceWeb Service is a Web-based, distributed modular components, which perform specific tasks, comply with specific technical specifications, these specifications enable Web Service can be compatible with other components interoperability.
JAXP (Java API for XML Parsing) in the Java definition of the use of DOM, SAX, XSLT generic interface. In this way the process of you as long as you use these generic

  • java written Guinness Collection 2009-06-17

    This article is part of my summing up, attachment containing the full content, please download java written Guinness Collection 1. (&,|,^) Logical operation on the operation and conditions (&&,||) difference. (15 points) A major difference bet

  • A comprehensive analysis of Java's garbage collection mechanism 2010-01-29

    Introduction Java run-time heap is a data area, the class instance (object) from which the allocation of space. Java Virtual Machine (JVM) heap storage of the applications that are running all the objects created, these objects through the new, newar

  • Transfer java written knowledge points 2008-12-04

    Java written test of knowledge transfer point from HashMap & Hashtable: Map interface implementation class will be the only key is mapped to a particular value on: <key,value>. HashM

  • I java written summary of common topics 2010-03-25

    Note: This is my java written summary of common topics, not pen Question Daquan, not necessarily other companies often and examination questions. 1.Overload and Override difference. Overloaded methods can change the return value type? Method of rewri

  • Comprehensive analysis of Java's garbage collection mechanism 2010-04-19

    Java heap is a run-time data area, the class instance (object) from distribution space. Java Virtual Machine (JVM) heap storage of the applications are running all the objects created, these objects through the new, newarray, anewarray and multianewa

  • Java's garbage collection mechanism 2010-06-24

    The full text: Study: yang677888 (from CSDN) Introduction Java run-time heap is a data area, the class instance (object) from distribution space. Java Virtual Machine (JVM)

  • java in the collection (interviews often test) 2010-07-08

    Recently quilt, and it 囧 . java in such a simple set of questions I answered vaguely, blame usually not serious ah. Summarize it. java in the collection divided into three categories: Set List Map (Set List inherited from the collection) Comparison o

  • JBPM used to resolve issues related to class (1): java.lang.LinkageError Collection 2010-09-12

    JBPM used to resolve issues related to class (1): java.lang.LinkageError collection of related applications when developing JBPM occur when the following exceptions: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation:

  • java written test questions (change) 2010-08-02

    First, talk about the final, finally, finalize the difference. final statement for the properties, methods and classes, respectively immutable properties, methods can not be covered, the class can not inherit. finally exception handling statement is

  • Java in the Collection and Map Xiang Jie - reproduced 2009-05-05

    Linear tables, linked lists, hash tables are commonly used data structures, making Java development time, JDK has already provided us with a corresponding set of classes to implement basic data structures. These classes are in the java.util package.

  • Java's garbage collection summary and to learn Java garbage collection mechanism for experience 2008-06-09

    Memory is a scarce resource, even if memory, a money one! If the improper use of programming, then the memory will run out of big. First, understand Java's automatic garbage collection garbage collection is one of the major characteristics of Java la

  • On Java, the garbage collection mechanism 2010-07-01

    1. Garbage collection is a dynamic storage management technology, which automatically releases the object reference is no longer procedure, according to a particular garbage collection algorithm to auto-recovery function of resources. When an object

  • Email small example Java program (reproduced Collection) 2010-10-27

    Today tried to write a Java mail small example, the need jar package are: activation-1.1.jar, commons-email-1.1.jar, The three mail-1.4.jar Code: Java code import org.apache.commons.mail.EmailException; import org.apache.commons.mail.SimpleEmail; pub

  • Java written in support of HTTP, FTP (transfer) 2008-06-21

    public class FileInfo { public String name; public String description; public FileInfo(String nm, String dscrp) { name = nm; description = dscrp; } } import; import; import;

  • java socket programming collection of four (thread pool) 2010-06-16

    1) Server-side Java code import *; import .*; public class PooledRemoteFileServer ( / / Server can deal with the activities of the maximum number of client connections protected int maxConnections; / / Listening port for incoming co

  • JAVA multi-threading of (collection) 2010-08-07

    Explore the concurrent programming (1 )------ operating Posts Explore the concurrent programming (2 )------ write thread-safe Java code Explore the concurrent programming (3 )------ Java memory model and shared objects Explore Concurrent Programming

  • Teradata Java written 2010-09-11

    Today to take a written examination, and feeling subject, although not too difficult, but still draw the line closed. Subject to recall the analysis of known was wrong: 1.javascript: alert (parseInt (07)); alert (parseInt ("07")); The result is

  • Java in the collection, intersection, union, difference operation 2010-10-20

    How to find two identical elements in the collection of the number of . The number of different elements, etc. , You can use the collection of and, to , With a set operation, the poor :apache.commons.collections.CollectionUtils This class provides su

  • java Socket Programming (collection) 2010-11-17

    socket Through the socket on the issue of database operations

  • Java FAQ Series (Collection) 2011-01-07

    1.1 java doubts You Know (I) 1.2 java doubts You Know (b) 1.3 java doubts You Know (c) 1.4 java doubts You Know (IV) 1.5 java doubts You Know (e) 1.6 java doubts You Know (f) 1.7 java doubts You Know (g) 1.8 java doubts You Know (h)