Java related basics

xiaoxiao2021-03-06  14

Java related basics

1. What are the object-oriented features?

Abstract:

Abstraction is to ignore those aspects that have nothing to do with current goals in a topic in order to pay more attention to aspects related to current goals. Abstract does not intend to understand all the questions, but just choose some of them, temporarily do not use some details. Abstract includes two aspects, one is abstract, and the other is data abstraction.

2. Inherit:

Inheritance is a hierarchical model of a joint, and allows and encourages the reuse of classes, which provide a clear expression of a commonality. A new class of an object can be derived from the existing class, which is called class inheritance. New categories inherit the characteristics of the original class, the new class is called the original class (subclass), and the original class is called a new class (parent class). Detective classes can inherit methods and instance variables from its base class, and class can modify or add new methods to make it more suitable for special needs.

3. Package:

The package is surrounded by processes and data, and access to data can only pass through the defined interface. Object-oriented calculations began in this basic concept, that is, the real world can be depicted into a series of complete autonomous, encapsulated objects, which access other objects through a protected interface.

4. Polymorphism:

Polymorphism refers to allowing different types of objects to respond to the same message. Polymorphisms include parameterized polymorphisms and polymorphisms. The polymorphic language has the advantages of flexible, abstract, behavioral sharing, code sharing, and well solves the application function of the same name.

2, is String a basic data type?

Basic data types include Byte, int, char, long, float, double, boolean, and short.

The java.lang.string class is final type, so this class cannot be inherited, and this class cannot be modified. In order to improve efficiency, we should use the StringBuffer class

3. What is the difference between int and integer?

Java offers two different types: reference types and original types (or built-in types). INT is the original data type of Java, and Integer is a package class provided by Java for INT. Java provides package classes for each original type.

Original type package

Boolean Boolean

Char Character

Byte Byte

Short short

Int Integer

Long Long

Float float

Double Double

The reference type and the original type of behavior are completely different, and they have different semantics. Reference Types and Original Types have different features and usage, including: size and speed problems, this type of data structure store, when the reference type and the original type are used as an instance data of a class Default. The default value of the object reference instance variable is NULL, and the default value of the original type instance variable is related to their type.

4, String and StringBuffer difference

The Java platform provides two classes: String and StringBuffer, which can store and operate strings, which contain characters data of multiple characters. This String class provides a string of values ​​that cannot be changed. The string provided by this StringBuffer class is modified. You can use StringBuffer when you know that character data is changed. Typically, you can use StringBuffers to dynamically construct character data.

5. What is the difference between abnormality at runtime?

An abnormality indicates the abnormal state of the program during operation, and the runtime exception indicates an exception that may be encountered in the usual operation of the virtual machine is a common run error. The Java compiler requires that the method must declare that the possible non-running abnormality, but does not require a statement that the abnormality that is not captured.

6. Say the life cycle of the servlet and say the difference between servlet and cgi.

After the servlet is instantiated by the server, the container runs its init method, the request is reached, the service method is automatically dispatched with the DOXXX method (Doget, DOPOST) corresponding to the request, and calls its Destroy when the server decides to destroy the instance. method. The difference from the CGI is that the servlet is in the server process, which runs its service method by multithreading, and an instance can serve multiple requests, and its instance is generally not destroyed, and CGI has a new process for each request. After the service is completed, it is destroyed, so it is less efficient than servlet.

7. Say the storage performance and feature of ArrayList, Vector, LinkedList

All ArrayList and Vector are stored in an array. This array element is larger than the actual stored data to increase and insert an element, which allows direct sequence index elements, but inserts an element to involve memory operation such as array elements, so index data Fast and inserted, Vector due to the use of the Synchronized method (thread security), usually more arraylist, and LinkedList uses two-way linked lists to store, and sequence index data needs to be forwarded or rearward, but inserting data only You need to record the front and rear items of this item, so the insert is faster.

8, EJB is based on which technologies are implemented? And said the difference between SessionBean and EntityBean, the difference between STATEFULBEAN and STATELESSBEAN.

EJB includes session beans, Entity Beans, JNDI, RMI, JAT, etc.

SessionBean is used in the J2EE application to complete some server-side business operations, such as accessing the database, calling other EJB components. EntityBean is used to represent the data used in the application system.

For clients, SessionBean is a non-persistent object that implements certain business logic running on the server.

For clients, EntityBean is a persistent object that represents an object view that stores entities in a persistent memory, or an entity implemented by existing enterprise applications.

Session Bean can also be subdivided into Stateful Session Bean with Stateless Session Bean. Both Session beans can perform system logic in Method, and the different is the stateful session bean to record the caller's status, so usually Say, a user will have an entity of a corresponding Stateful Session bean. Although Stateless Session Bean is also a logical component, but he is not responsible for recording the user's state, that is, when the user calls Stateless Session Bean, EJB Container does not look for the specific STATELESS SESSION BEAN entity to perform this Method. In other words, it is very likely that several users are executing the same bean's instance when executing a STATELESS SESSION bean's Methods. From memory, Stateful Session Bean compares the STATELESS SESSION bean, and Stateful Session Bean consumes more memory more than J2EE Server, but the advantage of the Stateful Session bean is that he can maintain the status of the user. 9, the difference between Collection and Collectes.

Collection is the superiors of the collection class, inheriting, with his interface, mainly SET and LIST.

Collections is a helper class for the collection class, and he provides a series of static methods to achieve search, sorting, thread security, etc. of various collections.

10, & and &&.

& A bit operator, representing bit and operation, && is a logical operator, representing logic and (AND).

11, the difference between HashMap and HashTable.

HashMap is a lightweight implementation of HashTable (non-thread security), they all completed the MAP interface, mainly distinguishing the HashMap allows empty (NUY) key value (key), due to non-threaded security, efficiency may be higher than HashTable.

Hashmap allows null as a key or value of Entry, while HashTable is not allowed.

Hashmap removes the HashTable's Contains method, changed to ContainSvalue and Containskey. Because the Contains method is easy to cause misunderstandings.

HashTable inherits from the Dictionary class, and HashMap is an implementation of the Map Interface introduced by Java 1.2.

The biggest difference is that the HashTable method is Synchronize, and HashMap is not, when accessed HashTable, does not need to be synchronized for its method, and HashMap must provide external synchronization.

Hash / rehash algorithms used by HashTable and Hashmap are probably, so performance will not have a big difference.

12, Final, Finally, Finalize distinction.

Final is used to declare attributes, methods, and classes, indicate that attributes are unambiguous, and the method is not covered, and the class cannot be inherited.

Finally is part of an exception handling statement structure, which is always executed.

Finalize is a method of the Object class. This method of recycling object is called when the garbage collector is executed, and other resource recycles when this method is available, such as turning off files. 13. What is the difference between SLEEP () and WAIT ()?

Sleep is a thread method, causing this thread to suspend the specified time, give the executive opportunity to other threads, but the monitoring state remains, and will automatically recover. Calling SLEEP does not release the object lock.

WAIT is the object of the object class. Call the WAIT method for this object causes the lecture to abandon the object lock. Enter the waiting lock pool waiting for this object, only the NOTIFY method (or NotifyAll) is issued after this object, after entering the object lock pool ready to get Object locks enter the operating state.

14, the difference between overload and override. Can OVERLOADED methods change the type of return value?

The method of rewriting Overriding and overloading overloading is a different manifestation of Java polymorphism. Overriding Overriding is a manifestation of polymorphism between parent class and subclasses, and overloading overloading is a manifestation in a class. If a method is defined in the subclass with the same name and parameters as its parent class, we say that this method is overriddled. When the subject of subclass uses this method, the definition of the subclass will be called. For it, the definition in the parent class is like "shielded". If a plurality of the same names are defined in a class, they or have different parameters or different parameter types, called overloading. The way OVERLOADED is to change the type of return value.

15. What is the difference between ERROR and EXCEPTION?

Error indicates a serious problem that recovery is not impossible but difficult. For example, memory is overflow. It is impossible to expect the program to handle this situation.

Exception represents a design or implementation problem. That is, it means that if the program runs normally, it will never occur.

16. How is it in synchronization and asynchronous, in what circumstances use them? for example.

If the data will be shared between the thread. For example, the data being written may be read by another thread, or the data being read may have been written by another thread, then the data is shared data, and must be synchronously.

When an application calls a method that takes a long time to perform, it is often used asynchronous programming when it takes a long time to perform, and it is often more efficient in many cases.

17. What is the difference between Abstract Class and Interface?

The presence of a declaration method does not implement its class called abstract class, which is used to create a class that reflects certain basic behavior and declares the class, but cannot implement this class in this class. Case. An instance of the Abstract class cannot be created. However, you can create a variable, which is an abstract class and let it point to an instance of the specific subclass. There is no abstract constructor or abstract static method. Subclasses of the Abstract class provide implementation for all abstraction methods in their parent class, otherwise they are also abstract classes. Instead, this method is implemented in the subclass. Other classes that know their behavior can be implemented in the class.

Interface is a variant of an abstract class. In the interface, all methods are abstract. Multiple inheritance can be obtained by achieving such an interface. All methods in the interface are abstract, no probabilities. The interface can only define the Static Final member variable. The implementation of the interface is similar to the subclass, except that the implementation class cannot inherit behavior from the interface definition. When the class implements a special interface, it defines the method of all such an interface (that is, the program body is given). Then, it can call the interface to call the interface on any object of the class of the interface. Because there is an abstract class, it allows the interface name as the type of reference variable. The usual dynamic cable will take effect. The reference can be converted to an interface type or a slave interface type, and the InstanceOf operator can be used to determine whether an object is implemented. 18. What is the difference between Heap and Stack.

The stack is a linear set, and the operation of adding and deleting elements should be completed in the same paragraph. The stack is processed in the way in which it is advanced.

Pile is a constituent element of the stack

19, the difference between Forward and Redirect

Forward is the server request resource, the server directly accesses the URL of the destination address, reads the response content of that URL, then sending these content to the browser, the browser does not know where the server sent is from, so Its address bar is still the original address.

Redirect is the server according to the logic, send a status code, telling the browser to re-request that address, generally saying that the browser re-requests all the parameters just requested, so session, the request parameter can be obtained.

20. The difference between EJB and Java Bean?

Java bean is a reused component that does not have a strict specification for Java Bean. In theory, any Java class can be a bean. In general, since the Java bean is created (such as Tomcat) by the container, the Java Bean should have a 11-free constructor, in addition, the Java Bean also implements the Serializable interface to implement the persistence of beans. Java Bean is actually equivalent to the COM component in the local process in the Microsoft COM model, which cannot be accessed across the process. Enterprise Java Bean is equivalent to DCOM, ie distributed components. It is based on Java-based remote method call (RMI) technology, so EJB can be remotely accessed (cross processes, cross-computers). But EJB must be deployed in a container such as WebSpere, WebLogic, and EJB customers never access true EJB components, but access them through their container. The EJB container is an agent of EJB components, and the EJB component is created and managed by the container. The client accesses the real EJB component through the container.

21, Static Nested Class and Inner Class are different.

Static NESTED CLASS is an internal class that is declared as static (STATIC), which can not depend on external class instances being instantiated. The usual internal classes need to be instantiated after instantification of external classes.

22. Different Dynamic Include and Static Include in JSP?

Dynamic include uses JSP: Include action to implement It always checks changes in the file included in the file, suitable for use with dynamic pages, and can with parameters.

Static include 码 码 码..............................

Assertion is a commonly used commissioning in software development, and this mechanism is supported in many development languages. In the implementation, Assertion is a statement in the program that checks a Boolean expression. A correct program must ensure that this Boolean expression is true; if the value is false, the program is already in an incorrect state. Next, the system will give a warning or exit. In general, Assertion is used to ensure the most basic and key correctness of the program. Assertion checks are usually opened when developed and tested. In order to improve performance, the assertion check is usually closed after the software is released.

24, what is GC? Why do you have GC?

GC is the meaning of garbage collection. Memory processing is where programmers are prone to problems, forget or erroneous memory recovery causes the unstable or even crash of the program or system, and the GC function provided by Java can automatically monitor the object. The purpose domain thus reaches the purpose of automatic recovery memory, and the Java language does not provide a display operation method that releases the allocated memory.

25, short s1 = 1; S1 = S1 1; What is wrong? SHORT S1 = 1; S1 = 1; What is wrong?

Short S1 = 1; S1 = S1 1; (S1 1 calculation result is an INT type, need forced conversion type)

Short S1 = 1; S1 = 1; (can compile correctly)

26, Math.Round (11.5) Is it equal to Math.Round (-11.5)?

Math.Round (11.5) == 12

Math.Round (-11.5) == - 11

The Round method returns a long integer that is closest to the parameters, and the parameter plus 1/2 is followed by its floor.

27, string s = new string ("xyz"); created a few String Object?

Two

28, design 4 threads, two threads increase 1 each time, and two threads are reduced each time. Write the program.

The following procedure uses internal classes to implement threads, and no order issues are not considered when J is reduced.

Public class threadtest1 {

Private int J;

Public static void main (string args []) {

Threadtest1 TT = New Threadtest1 ();

INC = TT.NEW INC ();

Dec dec = tt.new 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 incblements 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, have Java goto?

The reserved word in Java is now not used in Java.

30. Start a thread is Run () or start ()?

Starting a thread is to call the start () method so that the virtual process representing the thread is in operation, which means it can be scheduled and executed by the JVM. This doesn't mean that the thread will run immediately. The Run () method can generate a flag that must be exited to stop a thread.

31, EJB includes (sessionbean, entitybean) says their life cycle, and how to manage transactions?

The lifecycle of the STASSIONBEAN: STATELESS session bean is determined by the container. When the client issues a request to establish a bean instance, the EJB container does not have to create a new bean instance for client call, but a place to find a present Some instances are provided to the client. When the client calls a stateful session bean for the first time, the container must immediately create a new bean instance in the server, and related to the client, after this client calls the Stateful session bean method, the container will assign the call to This client is associated with a bean instance.

EntityBean: Entity Beans can survive relatively long time, and status is continuous. Entity Beans has always survive as long as the data in the database exists. Not in accordance with the application or service process. Even if the EJB container crashes, Entity Beans is also survived. The Entity Beans life cycle can be managed by the container or Beans.

EJB is implemented by the following technical management practices: Object Management (OMG) Object Service (OTS), Sun Microsystems Transaction Service (JTS), Java Transaction API (JTA), Development Group (X / Open) XA interface.

32. What are the application servers?

BEA WebLogic Server, IBM WebSphere Application Server, Oracle9i Application Server, Jboss, Tomcat

33. Give me a Runtime Exception you most often.

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, UNSUPPORTEDOPERATIONEXCEPTION34, whether the interface can inherit the interface? Does the abstract class implement (IMPLEMENTS) interface? Does the abstract class can inherit the physical class (Concrete Class)?

The interface can inherit the interface. Abstract classes can be implemented, whether abstract classes can inherit physical classes, but provided that the entity class must have a clear constructor.

35, LIST, SET, MAP inherit from a Collection interface?

List, SET is, MAP is not

36. What is the working mechanism of the data connection pool?

The J2EE server is started to establish a certain number of pool connections and maintaining no less than this number of pool connections. When the client program needs to be connected, the pool driver returns an unused pool connection and exposes its expression as busy. If there is currently no idle connection, the pool driver has created a certain number of connections, and the number of new connections has configured parameters. When the pool connection call is used, the pool driver is idle, and this connection can be used in other calls.

37. Is Abstract's method can be static, whether it can be native at the same time, is it SYNCHRONIZED?

both are not

38. Is there a length () method? String has a length () method?

The array does not have Length () method, with the properties of the length. String has a length () method.

39, the elements in the set cannot be repeated, then what method is used to distinguish whether it is repeated? Is it == or equals ()? What is the difference?

The elements in the set cannot be repeated, then use the iterator () method to distinguish whether you are repeated. Equals () is the judgment of whether two SETs are equal.

Equals () and == Method Decide whether the reference value points to the same object Equals () override in the class, which is the true value of the content and type of two separate objects.

40. Is the constructor CONSTRUCTOR can be Override?

The constructor constructor cannot be inherited, so Overriding cannot be overridden, but Overloading can be overloaded.

41, can you inherit the String class?

The String class is that the final class cannot be inherited.

42. If SWTICH can act on Byte, whether it can act on long, whether it can act on String? Switch (expr1), EXPR1 is an integer expression. Therefore, the parameters passing to the Switch and the CASE statement should be int, short, char or byte. Long, String can not work on SWTICH.

43, Try {} has a return statement, then the code in finally {} after this try is not executed, when is executed, before returnome or after?

Will be executed, execute before return.

44. Programming: 2 multiplied 8 equal to a few with the most efficient method?

2 << 3

45, the two object values ​​are the same (x.equals (y) == true, but there can be different haveh codes, this sentence is wrong?

No, there is the same Hash Code.

46. ​​After an object is passed as a parameter to a method, this method can change the properties of this object and return the resulting result, then here is the value delivery or reference delivery?

It is a value transfer. Java programming languages ​​only value pass parameters. When an object instance is transmitted to the method as a parameter, the value of the parameter is a reference to the object. The content of the object can be changed in the called method, but the reference to the object will never change.

47. After a thread enters an SYNCHRONIZED method of an object, can other threads can enter other methods of this object?

No, a Synchronized method of an object can only be accessed by one thread.

48. Program: Write a Singleton out.

The main role of the Singleton mode is to ensure that only one example exists in a Java application.

General Singleton mode usually has several forms:

The first form: Define a class, its constructor is private, it has a type of PRIVATE for a Static, an instantimeter of the class initialization, get a reference to it through a public GetInstance method, then call it Methods.

Public class singleton {

Private kindleton () {}

// Is it very strange to define an instance inside yourself?

// Note this is Private only for internal calls

Private static singleleton instance = new singleleton ();

/ / Here is a static method for accessing this Class, you can directly access

Public static singleleton getinstance () {

Return Instance;

}

}

The second form:

Public class singleton {

Private static singleton instance = null;

Public static synchronized singleton getInstance () {

// This method has been improved above, and it is only the first time.

// Generate an instance when using it, improve efficiency!

IF (instance == null)

Instance = new singleleton ();

Return Instance;}

}

Other forms:

Define a class, its constructor is private, all methods are static.

It is generally considered that the first form is more secure.

49, Java interface and the same and different placements of C .

Since Java does not support multi-inheritance, it is possible to use a class or object to use a method or attribute in several classes or objects, and existing single inheritance mechanisms cannot meet the requirements. Compared to inheritance, the interface has higher flexibility because there is no implementation code in the interface. When a class implements an interface, this class is to implement all methods and properties in the interface, and the properties in the interface are all public static below, all methods are public. Public. A class can implement multiple interfaces. 50. Simple principle and application of exception handling mechanism in Java.

When the Java program violates the semantic rules of Java, the Java virtual machine will represent an error as an exception. Violation of semantic rules include 2 cases. One is a semantic check in the Java class library. For example, the array subscript can trigger indexoutofboundsexception; nullpointerException will be triggered when accessing null objects. Another situation is that Java allows programmers to extend this semantic check, and programmers can create their own exceptions and freely choose to trigger exceptions with throw keywords. All exceptions are subclasses of java.lang.thowable.

51, the advantages and principles of garbage collection. And consider 2 recycling mechanisms.

A significant feature in the Java language is to introduce the garbage collection mechanism, which makes the problem of the most headache of C programmers, making the Java programmers no longer need to consider memory management when writing programs. Since there is a garbage collection mechanism, the object in Java no longer has the concept of "scope", and only the reference to the object has a "scope". Garbage recycling can effectively prevent memory leaks, effective use of memory that can be used. The garbage collector is usually operated as a separate low-level thread. In the case of unpredictable objects that have been died or have not used for a long time for a long time for a long time, the programmer cannot call the garbage collector in real time. Object or all objects are garbage collection. The recycling mechanism has a replica collection of garbage collection and marking garbage recovery, incremental garbage recovery.

52. Please tell us how the thread synchronization you know.

Wait (): Make a thread in the waiting state and release the LOCK of the object held.

Sleep (): Make a running thread in sleep state, is a static method, call this method to capture InterruptedException exceptions.

NOTIFY (): Wake up a thread in a waiting state, note that when this method is called, it is not exactly the thread that is awakened, but is determined by the JVM which thread is awake, and is not pressed.

AllNotity (): Wake all threads in the waiting state, not to give all the locks of all awakening threads, but let them compete.

53, what are your collection? Main method?

The most commonly used collections are LIST and MAP. The specific implementation of List includes ArrayList and Vector, which are variable-sized lists, which are more suitable for build, store, and operate any type of objects for any type object. List is suitable for use in value to access elements.

Map provides a more versatile element storage method. The MAP set class is used to store element pairs (called "keys" and "value"), where each key is mapped to a value.

54, describe the principle mechanism of JVM loading Class files?

The loading of the JVM is implemented by ClassLoader and its subclass, and Java ClassLoader is an important Java runtime system component. It is responsible for finding and putting a class file at runtime.

55. Can a Chinese Chinese character can be stored in the char type variable? Why?

It can be defined as a Chinese, because Java is encoded in Unicode, a char accounts for 16 bytes, so putting a Chinese is no problem.

56. There are several implementation methods for multi-threading. What are you doing? How many implementation methods are there?

There are two types of implementation methods, which are two types inherited the THREAD class and the implementation of Runnable interface synchronization, respectively, Synchronized, Wait and Notify

57, the built-in object and method of JSP.

Request represents the HTTPSERVLETREQUEST object. It contains information about the browser request and provides a number of methods for obtaining cookie, header, and session data.

Response represents the HTTPSERVLETRESPONSE object and provides several methods for setting the response to the browser (such as cookies, header information, etc.)

The OUT object is an instance of Javax.jsp.jspwriter, and provides several ways to make you use to return the output results to your browser.

PageContext represents a javax.servlet.jsp.pageContext object. It is an API for convenient access to various range spaces, servlet-related objects, and wraps a generic Servlet related feature.

Session represents a request Javax.Servlet.http.httpSession object. SESSION can store the status information of the user

Applicat represents a Javax.serve.ServletContext object. This helps find information about the Servlet engine and the servlet environment

Config represents a javax.servlet.ServletConfig object. This object is used to access the initialization parameters of the servlet instance.

Page Represents a servlet instance generated from this page

58. The basic concept of thread, the basic state of the thread and the relationship between state

Thread refers to an execution unit that can execute program code during execution, and each program has at least one thread, which is the program itself.

There are four states in Java, respectively, running, ready, hang, and end.

59, common instructions for JSP

<% @ page language = "java" contentYpe = "text / html; charset = GB2312" session = "true" buffer = "64kb" autoflush = "sthreadsafe = true" info = "text" errorpage = "error. JSP "iSerrorPage =" true "iSelignored =" true "pageEncoding =" gb2312 "import =" java.sql. * "%>

iSerrorPage (Can I use an Exception object), iSelignored (ignore expressions)

<% @ include file = "filename"%>

<% @ taglib prefix = "c" uri = "http: // ..."%>

60. What is calling doget () and dopost ()?

The Method property in the FORM tag in the JSP page is called DOGET (), and dopost () is called for POST.

61, the life cycle of servlet

The web container loads servlet, and the life cycle begins. The initialization of the servlet is performed by calling the servlet's init () method. Different DO *** () methods are called depending on the request different by calling the service () method. End the service, the Web container calls the servlet's Destroy () method.

62, how to real real servlet single-thread mode

<% @ Page isthreadsafe = "false"%>

63. Method of page object delivery

Request, Session, Application, Cookie, etc., JSP, and servlets, what are the same and different points, what is the connection between them?

JSP is an extension of servlet technology, essentially a simple way of servlet, and emphasizes the application's appearance expression. After JSP compiles "class servlet". The most important point of Servlet and JSP is that the application logic of servlet is in the Java file and is completely separated from the HTML in the representation. The case of JSP is that Java and HTML can be combined into a file that extension .jsp. JSP focuses on views, servlet is mainly used to control logic.

65, four session tracking technology

Session Scope Servlets JSP page description

Page No is a representative object and attribute related to a page. A page is represented by a compiled Java Servlet class (which can have any include instructions, but no include action). This includes both servlets and JSP pages compiled into a servlet.

Request is an object and attribute that represents a request issued to a web client. A request may span multiple pages, involving multiple web components (due to the relationship between the Forward Directive and the Include action)

Session is an object and attribute that represents a user experience with a web client. A web session can also request a number of client requests

Application is the object and attribute that represents the entire web application. This is essentially a global scope of the entire web application, including multiple pages, requests, and sessions.

66. The main method of the Request object:

SetAttribute (String Name, Object): Sets the parameter value of the request named name Name

GetaTtribute (String Name): Returns the value specified by name

GetAttributeNames (): Returns the name collection of all properties of the Request object, the result is an instance of an enumeration

getCookies (): Returns all Cookie objects of the client, the result is a cookie array

GetCharacterencoding (): Returns the character encoding method in the request

getContentLength (): Returns the length of the request

GetHeader: Get the file header information defined by the HTTP protocol

GetHeaders: Returns all values ​​of the Request Header of the specified name, the result is an instance of an enumeration

GetHeadernames (): Returns the name of the Request Header, the result is an instance of an enumeration

GetInputStream (): Returns the requested input stream for obtaining the data in the request

GetMethod (): Get the method of transmitting data to server-side

GetParameter (String Name): Get the client to send to the server-side parameter value

getParameterNames (): Get the name of all the parameters of the client to the server side, the result is an instance of an enumeration

getParameterValues ​​(String Name): Get all values ​​for the parameters specified by Name

GetProtocol (): Get the name of the protocol that the client is transferred to the server.

getQueryString (): Get query strings

getRequesturi (): Get the client address of the request string getRemoteAddr (): Get the client's IP address

getRemotehost (): Get the name of the client

GetSession ([Boolean Create]): Return and request related session

GetServerName (): Get the name of the server

GetServletPath (): Get the path to the script file requested by the client

GetServerPort (): Get the port number of the server

Removettribute (String Name): Delete a property in the request

67. J2EE is a platform or a framework?

J2EE itself is a standard, a standard platform provided for the development of a distributed application.

J2EE is also a framework, including JDBC, JNDI, RMI, JMS, EJB, JTA and other technologies.

68. We often encounter some coded characters in the web application development process, such as ISO8859-1, how to output a certain coded string?

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. Brief description of the difference between logic operation (&, |, ^) and conditional operation (&&, ||).

The difference between the two points: a. Condition operation can only be operated by Boolean, but logic operations can not only manipulate Boolean, but also operate value

b. Logic operations do not produce short circuits

70, how many forms of XML document definition? What is the essence difference between them? What kind of way to parse XML documents?

A: Two forms of DTD Schema, B: Essentially difference: Schema itself is XML, can be parsed by XML parser (this is also developing SCHEMA from DTD), C: There are DOM, SAX, Stax, etc.

DOM: It is very powerful when processing large files. This problem is caused by the tree structure of the DOM. This structure is more memory, and the DOM must load the entire document into memory before parsing the file. Suitable for random access to XML

SAX: Not present in DOM, SAX is an event-driven XML parsing method. It sequentially reads the XML file, and does not need to load all files all. When encountered at the beginning of the file, the end of the document, or the label is ended, it triggers an event, and the user handles the XML file by writing processing code in its callback event, suitable for the order of XML.

Stax: streaming API for XML (stax)

71, briefly describe the Similarities and As of Synchronized and java.util.concurrent.locks.lock?

Mainly identical: Lock can complete all the features implemented by SYNCHRONIZED

The main differences: LOCK has more accurate thread semanties and better performance than Synchronized. Synchronized will automatically release the lock, and LOCK must request the programmer manually to release and must be released in the finally clause.

72, EJB role and three objects

A complete EJB-based distributed computing structure consists of six roles, which can be provided by different developers, and every role must follow the EJB specification provided by Sun to ensure compatibility between each other. Sex. These six characters are EJB component developers, Application ASSEMBLERs, deployers, EJB server providers, EJB container providers (EJB container providers, System Administrator's three objects are Remote (localHome) interface, Bean class

73, the service provided by EJB container

It mainly provides services such as declaration cycle management, code generation, continuous management, security, transaction management, lock and distribution management.

74. What are the prohibition of the prohibited operation in EJB?

1. Can't operate threads and threads API (thread API means NOTINE, WAIT, etc.), 2. Can not operate AWT, 3. Can not implement server functionality, 4. Can not be given to static life, 5. Cannot be used IO operation directly access file system, 6. You can't load local libraries.

75, the main role of the Remote interface and HOME interface

The Remote Interface defines a business method for the EJB client calling business method.

The HOME interface is an EJB factory for creating and removing a lookup EJB instance

76, lifecycle of bean instance

For Stateless Session Bean, Entity Bean, Message Driven Bean typically exists in cache management, which typically contains Cache management, set up the context, create EJB Object (create), business method call, remove, etc. Procedure, for the bean in which the buffer is managed, the instance is not removed from memory, but the buffer pool scheduling mechanism continues to reuse the instance, and the bean in which Cache Management is used, the BEAN is maintained by activating and deactivating the mechanism. Limit the number of instances in memory.

77, EJB activation mechanism

Take Stateful Session Bean as an example: The Cache size determines the number of bean instances that can exist in memory. According to the MRU or NRU algorithm, instance is migrated between activation and deactivation, and the activation mechanism is when the client calls an EJB. When an instance business method, if the corresponding EJB Object discovers that it does not bind the corresponding bean instance, the reactive bean storage (by serializing mechanism storage instance) is replied (activated) this instance. The corresponding EJBACTIVE and EJBPASSIVATE methods are called before the state change.

Several types of 78, EJB

Session Bean, entity (Entity) bean message driver (Message Driven) bean

Session bean can be divided into stateful and stateless

Entity Beans can be divided into two kinds of sustainability (BMP) and container management of bean management (CMP)

79. Customer Service Call several basic steps for EJB objects Set the JNDI service factory and JNDI service address system properties, find the home interface, call the CREATE method from the Home interface to create the Remote interface, and call its business method through the Remote interface.

80, how to specify the size of the size to WebLogic?

In the Script of WebLogic (bitservername in the Domian corresponding server directory), add SET MEM_ARGS = -XMS32M -XMX200M, adjust the minimum memory to 32M, maximum 200M

81. How to set the hot start mode (development mode) of WebLogic and product release mode?

The startup mode of the corresponding server can be modified in the management console is one of the development or product modes. Or modify the service startup file or Comufact of the Commenv file, add set production_mode = true.

82. Do you need to enter your username and password when starting?

Modify the service launch file, add WLS_USER and WLS_PW items. You can also add an encrypted username and password in the boot.properties file.

83. After the application domain (or a website, Domain) is configured to configure the relevant information such as a application domain (or a website, domain) in the WebLogic Management State, which is actually saved in what file?

Save in the config.xml file of this Domain, it is the core profile of the server.

84, talk about a Domain default directory structure in WebLogic? For example, put a simple helloworld.jsp into the point of the directory, but you can be http: // host on the browser: port number // HelloWord .jsp You can see the result of the running?

Domain Directory / Server Directory / Applications, place the application directory in this directory will be available as an application access. If it is a web application, the application directory needs to meet the web application directory requirements, the JSP file can be placed directly in the application directory, Javabean needs to be put In the CLASSES directory for the application directory, the default application that sets the server will be able to implement the application name on your browser.

85. What configuration files need to be involved in the WEBLOGIC?

The configuration files involved in different types of EJBs have different configuration files including EJB-jar.xml, weblogic-ejb-jar.xmlcmp entity beans generally need WebLogic-Cmp-Rdbms-jar.xml

86. How to make an SSL configuration in WebLogic to configure the client's authentication configuration or talk about J2EE (standard) for SSL configuration

Using DemoIdentity.jks and Demotrust.jks KeyStore in the default installation, you need to configure the server to use Enable SSL, configure its port, you need to get private key and digital certificate from CA in product mode, create Identity and Trust KeyStore, load get Keys and digital certificates. You can configure this SSL connection to one-way or two-way.

87. How to view EJBs already released in WebLogic?

You can use the management console, you can view all published EJBs in its deployment

88, what is CORBA? What is the use?

The CORBA standard is a common object request agency structure, which is standardized by object management organization (Object Management Group, abbreviated as OMG). Its composition is the interface definition language (IDL), language binding (binding: also translated into a cable) and an agreement to interoperate interoperability. Its purpose is to use different programming languages ​​to run in different processes, develop in different operating systems.

89. Talk about how many common modes in J2EE you are familiar with or have heard? And some views of design patterns session facade pattern: Use sessionbean access EntityBean

Message Facade Pattern: Realization asynchronous call

EJB Command Pattern: Use Command JavaBeans to replace sessionBean to achieve lightweight access

Data Transfer Object Factory: Simplify EntityBean Data Provision for DTO Factory

Generic Attribute Access: Simplify EntityBean Data Provision for EntityBeaN

Business Interface: Realize the same interface to specify business logic through remote (local) interface and bean classes

The design of the EJB architecture will directly affect the performance, scalability, maintenanceability, components reusability and development efficiency. The more complex the project, the more important the project team, the more important it can reflect the importance of good design.

90, tell the difference between Persistent and Non-Persisten when developing message beans in WebLogic

The MDB of the Persistent method ensures the reliability of the message delivery, that is, if the EJB container has problems, the JMS server will send the message when this MDB can be used, and the Non-Persistent method will be discarded.

91. What kind of method is generally implemented when the servlet is executed?

Public void init (servletconfig config)

Public servletconfig getServletConfig ()

Public String GetServletInfo ()

Public void service (servletRequest Request, ServletResponse Response)

Public void destroy ()

92, J2EE common design model? Description plant mode.

23 design patterns in Java:

Factory, Builder, Factory Method (factory method mode),

Prototype, Singleton, Facade (facade),

Adapter, Bridge (Bridge mode), Composite (synthesized mode),

Decorator, Flyweight, Proxy (proxy mode),

Command, Interpreter, Visitor (visitor mode),

Iterator, Mediator, MEMENTO, OBSERVER, State, Strategy, STRATEGY (strategy),

Template Method (Template Mode), Chain of Responsibleity (Responsibility Chain Mode)

Factory mode: Factory mode is a model that is often used. The class implemented according to the factory mode can generate an instance of a class in a set of classes in accordance with the data provided. Usually this set of categories have a public abstract parent class and The same method is achieved, but these methods have different operations for different data. First, you need to define a base class that the subclass of the class implements the method in the base class through a different method. Then need to define a factory class, and the factory class can generate different subclass examples depending on the conditions. When an example of a subclass is obtained, the developer can call the method in the base class without having to consider the instance of which a subclass is returned.

93, EJB needs to implement its business interface or home interface, please briefly describe the reasons.

The remote interface and home interface do not need to be directly implemented, and their implementation code is generated by the server, and the implementation class in the program run is used as an instance of the corresponding interface type.

94. What kinds of methods are there? Please list it. Implement a rapid sort with Java.

Sort by: Insert Sort (Direct Insert, Hill Sort), Switching Sort (Bubble Sort, Rapid Sort), Select Sort (Direct Selection Sort, Stack Sort), Multiple Sort, Distribution Sort (Sort, Base Sort )

Quickly sorted pseudo code.

/ / Sort a Quick Sorting Method to A [0: N- 1]

Select an element from a [0: N- 1] as M i D l E, the element is fulfilled

The remaining elements are divided into two LEFTs and R I g h t, so that the elements in L E f T are less than or equal to the fulcrum, and the elements in the RIGHT are greater than equal to the fulcrum

Returning use of fast sorting methods to sort Left

Returning use of rapid sorting methods to sort Right

The result of the result is L E f T M I D D L E R I g H t

95, explain the following noun commonly used in J2EE (or briefly description)

Web container: Provides an environment to the application component (JSP, servlet) that interacts the JSP, Servlet directly more in the container, and does not have to pay attention to other system issues. There is mainly a web server to achieve. For example: Tomcat, WebLogic, WebSphere, etc. The interface provided by the container strictly abides by the Web Application standard in the J2EE specification. We call the Web Server of the above standards called the web container in J2EE.

EJB container: Enterprise Java Bean container. More industry segments. He provides various management functions that run the component EJB. As long as the EJB that satisfies the J2EE specification is placed in this container, it will be managed by the container. And you can obtain system level services through ready-made interfaces. For example, email services, transaction management.

JNDI: (Java Naming & Directory Interface) Java Name Directory Service. The main functionality is: Provide a directory system that allows applications from all over its own index to meet the functionality of fast finding and positioning distributed applications. JMS: (Java Message Service) Java Message Service. It mainly implements communication between the various applications. Includes point-to-point and broadcast.

JTA: (Java Transaction API) Java Transaction Services. Provide a variety of distributed transaction services. The application only needs to call the interface provided.

JAF: (Java Action Framework) Java Security Authentication Framework. Provide some security control frames. Let developers implement their own personal safety control strategies through a variety of deployment and customization.

RMI / IIOP: (Remote Method Invocation / Internet Object Request a Intermediary Protocol) They are primarily used to serve through remote calls. For example, remotely running a program, which provides stock analysis services, we can implement them directly on your local computer. Of course, this is to communicate between heterogeneous systems through a certain specification. RMI is unique to Java.

96. How does Java language processes an exception handle, keywords: throws, throw, try, catch, finally represents what significance? Can I throw an exception in the TRY block?

Java processes abnormally by object-oriented methods, and classifies a variety of different exceptions and provides a good interface. In Java, each exception is an object, which is an instance of the throwable class or other subclass. When an abnormality occurs, an exception object is thrown, and the object contains abnormal information, and the method of calling this object can be captured and processed. Java's exception handling is achieved by 5 keywords: try, catch, throw, throws and finally. Under normal circumstances, use TRY to perform a program, if an exception occurs, the system will throw an exception, then you can capture (catch) it through its type, or finally by default processor Treatment.

Use TRY to specify a program that prevents all "exceptions". Keeping followed by the Try program, a Catch clause should be included to specify the type of "exception" you want to capture.

The throw statement is used to clearly throw an "exception".

Throws is used to indicate a variety of "exceptions" that may be thrown by a member function.

Finally is executed to ensure that "exception" occurs regardless of the code.

You can write a TRY statement outside in a member function call, write another TRY statement to protect other code inside this member function. Whenever you encounter a try statement, the "exception" frame is placed on the stack until all TRY sentences are completed. If the TRY statement at the next level does not process some "exception", the stack will be expanded until the TRY sentence with this "exception" is encountered.

97, can I include multiple classes (not internal classes) in a ".java" source file? What is the limit?

can. There must be only one class name with the file name.

98, all parts of MVC have those technologies to achieve? How to achieve?

MVC is a short written by Model-View-Controller. "Model" is the application's business logic (implemented by javabean, ejb component), "view" is the application's representation surface (generated by JSP page), "Controller" is a process control (generally a servlet) The application logic, processing procedure, and display logic are achieved by this design model into different components. These components can interact and reuse. 99. How many ways to implement a thread in Java? What is the use of keyword modified synchronization methods? Stop () and SUSPEND () methods do not recommend it?

There are two implementation methods, which are inherited the Thread class and the implementation of the runnable interface.

Synchronization method with synchronized keyword

Oppose the use of STOP () because it is not safe. It will release all locks acquired by the thread, and if the object is in a non-connected state, then other threads can check and modify them in that state. It is difficult to check the real problem. The suspend () method is prone to dead locks. When you call suspend (), the target thread will stop, but still hold the lock before this. At this point, any other thread cannot access the locked resource unless the thread is restored to the thread. For any thread, if they want to resume the target thread, it will cause a deadlock to use any lock resources. So you should not use Suspend (), and you should place a sign in your own Thread class, pointing out that the thread should act or hang. If the flag indicates that the thread should hang, use Wait () to enter the waiting state. If the flag indicates that the thread should be restored, use a Notify () to restart the thread.

100. How many types of streams in Java? JDK provides some abstract classes for each type of stream for inheritance, please say which classes are they?

Byte stream, character stream. Byte streams are inherited in InputStream / OutputStream, and the character stream is inherited in InputStreamWriter. There are many other streams in Java.IO bag, mainly in improving performance and convenience.

101. Does memory leaks in Java? Please briefly describe it.

meeting. Such as: INT I, I2; RETURN (I-I2); // when i is a positive number, i2 is a large negative number. The result will cause a seating, resulting in errors.

102. What is the mechanism for achieving polymorphism in Java?

The method of rewriting Overriding and overloading overloading is a different manifestation of Java polymorphism. Overriding Overriding is a manifestation of polymorphism between parent class and subclasses, and overloading overloading is a manifestation in a class.

103. What is the basic principle of garbage collector? Can garbage collectors recycle memory immediately? Is there any way to actively notify the virtual machine for garbage collection?

For GC, when the programmer creates an object, the GC starts to monitor the address, size, and usage of this object. Typically, the GC uses a map-like manner to record all objects in the heap (HEAP). In this way, it is determined which object is "can be reached", which object is "unreachable". When the GC determines that some objects are "unreachable", GC is responsible for reclaiming these memory spaces. can. The programmer can manually execute System.gc (), inform GC operation, but Java language specification does not guarantee that GC will be executed.

104, differences in static variables and instance variables?

Static i = 10; // constant class a a; a.i = 10; // variable

105, what is Java serialization, how to implement Java serialization?

Serialization is a mechanism for processing the target stream, the so-called object stream is to fluidize the contents of the object. It is possible to read and write the fluidized object, and the flowable object can also be transmitted between the network. Serialization is to solve problems caused by read and write operations on object flows.

Serialization Realization: The sequential class is required to implement the serializable interface. The interface does not need to be implemented. Implements Serializable is only serialized in order to mark the object, and then use an output stream (such as a fileoutputstream) to construct An ObjectOutputStream (Object Stream) Object, then use the ObjectOutputStream object's WriteObject (Object Obj) method to write the objects of the object (ie, save its status), if you want to recover, you can use the input stream.

106. Can I send a call to a non-Static method from one STITIC method?

No, if it contains Method () of the object; cannot guarantee the initialization of the object.

107, when writing clone () methods, there is usually a line of code, what is it?

Clone has default behaviors, super.clone (); he is responsible for generating the right size space and copying in position.

108, in Java, how to jump out the current multi-nest loop?

Use Break; Return method.

109, List, Map, SET three interfaces, how is it?

List holds an element in a specific order, there can be repeated elements. SET cannot have a repeating element, internally sorted. Map saves the key-value value, Value can be more values.

110, what is J2EE?

J2EE is a Multi-Diered, distributed, distributed, component-based, enterprise application model. In such an application system, it can be divided according to functionality. For different components, these components can be on different computers and are in the corresponding hierarchy (TIER). The hierarchies are included in the ClientN Tier components, web layers, and components, Business layers, and components, and corporate information systems (EIS) layers.

111, UML

Standard Modeling Language UML. Modal example, static map (including class diagram, object map, and package), behavioral diagram, interaction map (sequential diagram, cooperation graph), implementation diagram.

112, say some common class, package, interface, please give 5

Common class: BufferedReader BufferedWriter FileReader Filewirter String Integer

Common package: java.lang java.awt java.io java.util java.sql

Common interface: Remote List Map Document NodeList

113. In the development, the design model is used? What is used?

Each mode describes a problem that has emerged in our environment and then describes the core of the solution. In this way, you can use the existing solutions countlessly without counting the same job. Mainly used in the design pattern of MVC. Used to develop JSP / Servlet or J2EE related applications. Simple factory model, etc.

114, what actions do you have? What is the role?

JSP has the following six basic action JSP: include: Introducing a file when the page is requested. JSP: Usebean: Find or instantiate a JavaBean. JSP: setProperty: Sets the properties of JavaBean. JSP: getProperty: Outputs the properties of a JavaBean. JSP: Forward: Turn the request to a new page. JSP: Plugin: Generate Object or Embed tags based on the browser type. 115, Anonymous Inner Class (anonymous internal class) Can IMPLEMENTS INTERFACE?

You can inherit other classes or complete other interfaces, this way is commonly used in Swing program.

116. The difference between application servers and web Server?

Application Server: WebLogic, Tomcat, JBoss

Web Server: IIS, Apache

117, the connection and difference between BS and CS.

C / S is the abbreviation of Client / Server. Servers typically use high-performance PCs, workstations, or small machines, and use large database systems such as Oracle, Sybase, Informix, or SQL Server. The client needs to install a dedicated client software.

B / S is an abbreviation of Brower / Server, just install a browser, such as Netscape Navigator or Internet Explorer, such as Netscape Navigator, or Internet Explorer, and a database such as Oracle, Sybase, Informix, or SQL Server. In this configuration, the user interface is implemented completely through the WWW browser, and the transaction logic is implemented at the front end, but the main transaction logic is implemented at the server. The browser interacts with the database with the database.

C / S and B / S difference:

1. The hardware environment is different:

C / S is typically built on a dedicated network, a small network environment in a small area, and the local area network provides connection and data exchange services through a dedicated server.

B / S is built on the WAN, which is not necessarily a special network hardware environment, examples of online Internet access, renting equipment. Information yourself, there is a stronger adaptation range than C / S, usually as long as there is operating system and browser

2. Different security requirements

C / S typically facing relatively fixed user groups, which is very controlled for information security. Generally high confidential information systems are suitable for C / S structures. Open information can be publicly available via the B / S distribution section.

B / S is built on a wide area network, which is relatively weak for security control capabilities, and may facing unknown users.

3. Different program architectures

The C / S program can be more focusing on the process, and you can check the permissions multi-level check, which can be considered less.

B / S has a multiple consideration of security and access speed, based on the more optimized basis. The program architecture of the B / S structure B / S structure is a trend of development, from the MS .NET series BizTalk 2000 Exchange 2000, etc., fully supporting the system for network components. SUN and IBM push JavaBean component techniques, etc., make B / S mature more mature.

4. Software is reused

The C / S program can be inevitable integrally, the reuse of the component is not as low as the reuse of the components of B / S.

The multi-structure of B / S is required to relatively independently. It is relatively good to be reused. If the table buying table can be used, not the stone table on the wall

5. System maintenance

Due to overall performance, the C / S program must be overall, the problematic problems and system upgrades. Upgrade is difficult. Maybe a new system

The B / S component consists of individual replacement, and the seamless upgrade of the system is realized. The system maintenance cost is minimized. Users can download and install them from the Internet to implement the upgrade. 6. Different problems

The C / S program can handle the user plane, and high demand in the same area, security requirements, related to the operating system. It should be the same system

B / S is built on a wide area network, facing different user groups, dispersing the region, which is C / S that is unable to do. The relationship with the operating system platform is minimized.

7. Different user interface

C / S is mostly established Window platform, the performance method is limited, and the programmer is generally required.

B / S is built on a browser, there is a richer and vivid way to communicate with the user. And most difficulty is reduced, and the development cost is reduced.

8. Different information flow

The C / S program is generally a typical centralized mechanical treatment, relatively low interactivity.

B / S information flows to change, B-B B-C B-G and other information, the flow direction changes, more like the trading center.

118, Linux under the thread, the explanation of the GDI class.

Linux implemented is based on the "one-to-one" thread model of the core lightweight process, and a thread entity corresponds to a core lightweight process, and the management between the thread is implemented in the nuclear external function library.

The GDI class is an image device programming interface class library.

119, Struts application (such as Struts architecture)

Struts is an open source of the open source of the web application using Java Servlet / JavaServer Pages technology. The Struts can develop an application architecture based on MODEL-View-Controller design mode. Struts has the following main functions: I contain a controller servlet to send the user's request to the corresponding Action object. II.Jsp Free Tag Library and provide association support in the Controller Servlet to help developers create interactive form applications. 3. Provide a series of practical objects: XML processing, automatically handle JavaBeans properties, international tips and messages through Java Reflection APIs.

120, what is JDO?

JDO is a new norm of Java object persistence, which is a referred to as Java Data Object, and is also a standardized API for accessing objects in some data warehouse. JDO provides transparent object storage, so that the developer does not require additional code (such as the JDBC API). These cumbersome routines have been transferred to the JDO product provider, so that developers are freed out to concentrate on time and energy logically. In addition, JDO is flexible because it can run on any data underlayer. JDBC is just more common to relational database (RDBMS) JDO, providing storage capabilities of any data underlying, such as relational database, file, xml, and object database (ODBMS), etc., make it stronger to apply portability.

121, can the internal class can reference him members of the class? Is there any restriction?

An internal class object can access the content of the created external class object

122, web service noun explanation. JSWDL development package. JAXP, JAXM explanation. SOAP, UDDI, WSDL Explanation.

Web ServiceWeb Service is a network-based, distributed modular component, which performs specific tasks, complies with specific technical specifications, which make Web Service interoperate with other compatible components.

JAXP (Java API for XML PARSING) Defines the universal interface using DOM, SAX, XSLT in Java. This way in your program you only need to use these universal interfaces, and do not need to modify the code when you need to change the specific implementation.

JAXM (Java API for XML Messaging is an API that provides access methods and transport mechanics for SOAP communication. WSDL is an XML format for describing network services as a set of endpoints that operate on messages that contain document information or process information. This format first abstracts the operation and message, then binds it to the specific network protocol and message format to define endpoints. The relevant specific endpoints are combined into an abstract endpoint (service).

SOAP is a Simple Object Access Protocol, which is a lightweight protocol used to exchange XML encoded information.

The purpose of UDDI is to establish standards for e-commerce; UDDI is a web-based, distributed, implementation standard specification provided by the information registry for Web Service, and also includes a group of web services that can provide themselves. Register to achieve the implementation of the access protocols that other companies can discover. [SIZE = 8] [/ size]

转载请注明原文地址:https://www.9cbs.com/read-49385.html

New Post(0)