Basic knowledge: Simple principle and application of exception handling mechanism in C or 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. 2. The same and different sages of Java interfaces and C virtual classes. 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. 3. 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. 4. Please tell 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. 5. Please talk about the usage and function of the system and virtual functions. 6. What is the difference between ERROR and EXCEPTION? Error indicates that the system-level error and the exception do not have to be processed, and Exception represents an exception to capture or require a program. 7. A class in Java is declared as a final type, what does it mean? It is said that the class cannot be inherited, it is a top class. 8. Describe your most common programming style. 9. 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. Piles are a set element 10. If the system wants to use a large integer (more than the long range), you design a data structure to store such a super-large number and design a algorithm to achieve a large integer addition.
Public class bigint () {int [] arrone = new arrone [1000]; string = ""; public int [] arr (string s) {IntString = s; for (int i = 0; I 16, the difference between Collection and Collectes. Collections is a class under java.util that contains a variety of static methods related to the collection. Collection is an interface under java.util, which is a parent interface of a variety of collections. 17. When did you use Assert. As an assertion, a statement containing Boolean expression, assuming that the expression is TRUE when this statement is executed. If the expression is calculated as false, then the system will report an AssertionError. It is used to debug purposes: assert (a> 0); // throws an assertionError if a <= 0 assertion can have two forms: assert expression1; assert expression1: expness2; Expression1 should always generate a Boolean value. Expression2 can be any expression that draws a value. This value is used to generate a String message displaying more debugging information. As default, it is disabled by default. To enable assertions while compiling, you need to use Source 1.4 tag: Javac -Source 1.4 Test.java To enable assertion at runtime, you can use the -enableassertions or -ea tag. To disable assertion at runtime, you can use the -DA or the -disableAssertions tag. To enable assertion in the system class, you can use the -esa or -dsa tag. You can also enable or disable assertions on the basis of the package. An assertion can be placed at any position that is not reached in normal conditions. As an assertation can be used to verify the parameters passing to the private method. However, assertions should not be used to verify parameters passing to the public method, as there is no matter whether it is enabled, the public method must check its parameters. However, it can be used in public methods or in a non-public method to use asserts to test the post condition. In addition, the assertion should not change the status of the program in any way. 18. What is GC? Why do you have a GC? (Foundation). GC is a garbage collector. Java programmers don't have to worry about memory management because the garbage collector will automatically manage. To request garbage collection, one of the following methods can be called: system.gc () runtime.Gcuntime (). GC () 19, string s = new string ("XYZ"); create a few String Object? Two objects One is "XYX", one is a reference object S with "XYX". 20, Math.Round (11.5) Is Math.Round (-11.5) equal to? Math.Round (11.5) Return (long) 12, Math.Round (-11.5) Return (long) -11; 21, Short S1 = 1; S1 = S1 1; What is wrong? SHORT S1 = 1; S1 = 1; What is wrong? SHORT S1 = 1; S1 = S1 1; wrong, S1 is SHORT type, S1 1 It is int type and cannot be explicitly converted to a Short type. Can be modified to S1 = (Short) (S1 1). Short S1 = 1; S1 = 1 is correct. 22, SLEEP () and WAIT () What is the difference? The favorite SLEEP () method of making thread is to stop the thread to stop a period of time. After the SLEEP time interval is full, the thread does not necessarily resume it immediately. This is because at that moment, other threads may be running and are not scheduled to give up execution, unless (a) "wake up" thread has higher priority (b) that is running because of other reasons. Wait () is a thread interaction if the thread issues a wait () call, the thread is suspended, the object is adjusted to the waiting state until it is awake or waiting time. 23 24. Is there a length () method for arrays? STRING has a length () method? The array does not have Length () method, with the properties of the length. String has a length () method. 25, the difference between overload and Override. OverLoaded method can change the type of return value? Override Overriding and overload 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. 26, the elements in Set cannot be repeated, then what method is used to distinguish whether it is repeated? Is it == or equals ()? What is the difference? The element in Set is not repeated, then use iterator () The method is distinguished from whether it is 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. 27, 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, What is the difference between systemException, undeclaredthrowableexception, unmodifiableteextException, unsupportedOperationException 28, error and exception? Error indicates a serious problem that recovery is not impossible but very 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. 29, List, SET, MAP inherits from the Collection interface? List, SET is MAP is not 30, what is the difference between Abstract Class and Interface? The presence of a declaration method does not implement its class called an abstract class (Abstract Class), it Used to create a class that reflects certain basic behavior and declares the class for this class, but cannot implement this class in this class. 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. 31. Is Abstract to Method to be static, whether it is Native to Native, can you be synchronized? (Concrete Class)? 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. 33. Starting a thread is RUN () or start ()? Starting a thread is to call the start () method so that the virtual processor represented by the thread is running, 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. 34. Is the constructor can be inherited by the Override® constructor constructor, so Overriding cannot be overridden, but Overloading can be overloaded. 35, can you inherit the String class? The String class is not inherited by the final class. 36. After a thread enters a synchronized method of an object, other methods of other threads can enter this object? No, one Synchronized method of an object can only be accessed by one thread. 37, Try {} has a Return statement, then the Code keeping in the finally {} after this try, will not be executed, when is executed, before returnome or after it will be executed, execute before return. 38. Program: 2 multiplied by 8 equals with 8 equals? Programmers with C background particularly like to ask this question. 2 << 3 39, the two object values are the same (x.equals (y) == true), but there is a different Hash code, this sentence is wrong? No pair, there is the same haveh code. 40. 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. The Java programming language is only passed by the value. 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. 41. 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. 42. Program: Write a Singleton. 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 state of static private, instantoneation, and GetInstance through a public Method Get a reference to it, then calls it. Public class singleton {private singleton ()} // define one instance in itself, is it very strange? / Note This is private only for internal calling private static singleton instance = new singleton (); // here provides a static method for external access to this Class, you can directly access public static singleton getInstance () {return instance;}} The second form: public class singleleton {private static singleleton instance = null; public static synchronized singleton getInstance () {// This method is improved above, do not have to generate an object each time, only the first time // Generate an instance and improve efficiency! IF (instance == null) instance = new start;}} Other forms: Define a class, its constructor is private, all methods are static. It is generally considered that the first form should be more secure Some HashTable and HashMap HashTable inherited from the Dictionary class, and HashMap is a real-time Map Interface of the Java 1.2 introduced HashMap allows NULL as a key or value of the entry, and HashTable is not allowed. That is, Hashmap removes the Hashtable's Contains method, changed to ContainSvalue and Containskey. Because the Contains method is easy to cause misunderstandings. 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. 43. Describe the principle mechanism of the JVM load Class file? 44. Test example shows a typical garbage collection algorithm? 45. Use the Java to write the binary algorithm to implement the addition of data to form a binary tree function, and print it in a preface. 46. Please write a Java program to implement the thread connection pool function? 47. Given a C language function, require implementation to call in the Java class. 48, a piece of code is implemented after the console inputs a set of numbers, after being sorted in the console output; 49, list all files under a folder; 50, call the system command to delete the file operation; 51, achieve A character is read in a file; 52, list some of the control flows; 53, what states? 54. Writing a server-side program implementation is displayed on the client input character and displayed on the console until "end" is input, let you write the client's program; 55, scope public, private, protected, and do not write Difference A: The difference is the following: Scope Current class Package children's grandson class other package public √ √ √ √ protected √ √ × × Friendly √ √ × × private √ × × × Non-write time defaults to Friendly 56, ArrayList and Vector Difference ARRAYLIST and Vector mainly from the second aspect. I. Synchronization: Vector is a thread safe, that is, ArrayList is unsafe, not synchronous Data growth: When you need to grow, Vector default growth is the original training, and ArrayList is half a half of Hashmap and HashTable mainly from three aspects. I. Historical reasons: HashTable is an implementation of the old Dictionary class. Hashmap is an implementation of the MAP interface introduced by Java 1.2. Synchronism: HashTable is the thread security, that is, HashMap is not safe. , Not synchronized three. Value: Only HashMap allows you to use null values as a key or value 57 of a table, can CHAR type variables Can CHAR type variables? Why? A: It is possible to define a Chinese Because Java is encoded in Unicode, a char accounts for 16 bytes, so a Chinese is no problem 58. There are several implementation methods for multi-threading. What is it? Synchronize several implementation methods, what? A: Multi-thread has two implementation methods, which are two kinds in inheriting the THREAD class and implementing the implementation of Runnable interface synchronization. SYNCHRONIZED, WAIT and Notify 59, garbage collection mechanism, how to optimize the program? I hope everyone will make up, thank you 60, float type float f = 3.4 is it correct? A: incorrect. The accuracy is inaccurate, should be converted with mandatory type, as shown below: float f = (float) 3.4 61, introduce the Collection Framework in Java (including how to write your own data structure)? A: Collection Framework as follows: Collection ├List │├ LinkedList │ ├ARRAYLIST │ ├Stack └SET MAP HashTable ├Shmap └weakhashmap Collection is the most basic set interface, a Collection represents a group of objects, Elements Map provides key to value map 62, Abnormal handling mechanism, event mechanism in Java? 11. Proffles and inheritance in Java? I hope everyone will make up, thank you 63, abstract class and interface? A: Abstract class and interface are used for abstraction, but the abstract class (Java) can have its own partial implementation, and the interface is completely an identifier (both multiple inheritance functions). Program: 1. Now enter N numbers, separately, separate; then select liter or descending order; click on the submit button to display what is sorted by another page, the result is, providing a reset answer (1) public static string [] splitstringBycomma (String " Source) {if (source == null || Source.trim (). Equals (")) Return Null; StringTokenizer Commatoker = New StringTokenizer (Source,", "); String [] Result = new string [commatoker.countTokens (); int i = 0; while (commatoker.hasmoretoKens ()) {result [i] = commatoker.nextToken (); i ;} return result;} loop traversing string array integer.parseint (String s) becomes INT The type consists of INT array arrays.sort (int [] a), A array ascending descending order can output 2 from the tail. The amount converted, the amount of the Arab figures converted into Chinese traditional forms such as (¥ 1011) -> (1 thousand and one yuan) output. 3, the execution order of the class is generally a choice question, ask you how to print it? A: Parent class: package test; public class fatherclass {public fatherclass () {system.out.println ("FatherClass Create ");}} subclasses: package test; import test.FatherClass; public class ChildClass extends FatherClass {public ChildClass () {System.out.println (" ChildClass Create ");} public static void main (String [] args) {FatherClass fc = new FatherClass (); ChildClass cc = new ChildClass ();}} the output:? C:> java test.ChildClass FatherClass Create FatherClass Create ChildClass Create 4, the internal implementation class a: the following sample code: package test; public class OuterClass {private class InterClass {public InterClass () {System.out.println ( "InterClass Create");}} public OuterClass () {InterClass ic = new InterClass (); System.out.println ( "OuterClass Create ");} public static void main (String [] args) {OuterClass oc = new OuterClass ();}} The output: C:> java test / OuterClass InterClass Create OuterClass Create a further example: public class OuterClass {private double D1 = 1.0; // INSERT CODE Here} You NEED TO INSE rt an inner class declaration at line 3. Which two inner class declarations are valid (Choose two.) A. class InnerOne {public static double methoda () {return d1;}}? B. public class InnerOne {static double methoda () {return d1;}} C. private class InnerOne {double methoda () {return d1;}} D. static class InnerOne {protected double methoda () {return d1;}} E. abstract class InnerOne {public abstract double methoda ( );} The description is as follows: 1. The static internal class can have a static member, not a static member. Therefore, A, B is wrong. The non-static member of the static internal class can access the external class static variables, and the non-static variables of the external class are not accessible; RETURN D1 error. Therefore, D is not three. Non-static members of non-static internal classes can access unstatic variables of external classes. Therefore, C, E 5, Java communication programming, programming questions (or question and answer), programming, read servers, and write to local display with Java Socket A: Server side program: package test; import java.net *; import java.io. *; public class Server {private ServerSocket ss; private Socket socket; private BufferedReader in; private PrintWriter out; public Server () {try {. SS = New ServerSocket (1000); while (True) {socket = ss.accept (); string remoteip = socket.getinetaddress (). gethostaddress (); string remoteport = ":" socket.getlocalport (); system.out .println ( "A client come in IP:!" RemoteIP RemotePort); in = new BufferedReader (new InputStreamReader (socket.getInputStream ())); String line = in.readLine (); System.out.println ( " Cleint Send IS: " Line); OUT = New PrintWriter (Socket.getOutputStream (); out.println (" Your Message Received! "); Out.close (); in.close (); socket.close ()}}}}}} ("wrong");}}} public static void main (String [] args) {new server ();}}; client-side program: package test; import java .io. *; import java.net. *; public class client {socket socket; buffredreader in; printwriter out; public client () {Try { System.out.println ("Try to Connect To 127.0.0.1:10000"); socket = new socket ("127.0.0.1", 10000); System.out.Println ("The Server Connected!"); System.out, SYSTEM.OUT .println ( "Please enter some Character:"); BufferedReader line = new BufferedReader (new InputStreamReader (System.in)); out = new PrintWriter (socket.getOutputStream (), true); out.println (line.readLine () ); in = new buffreader (new input.getinputstream ())); system.out.println (in.readline ()); out.close (); in.close (); socket.close (); } catch (ioException e) {outputln ("wrong");}} public static void main (string [] args) {new client ();}}; 6, using Java implement a sort, Java class implementation sequence Method (two)? As in the Collection framework, what kind of interface is to be achieved? A: Sort by the insertion method is as follows Package Test; import java.util. *; Class insertsort {arraylist al; public insertsort (int Num, int mod) {al = new arraylist (num); random rand = new random () System.out.println ("The ArrayList Sort Before:"); for (int i = 0; i A: The code is as follows: package test; class SplitString {String SplitStr; int SplitByte; public SplitString (String str, int bytes) {SplitStr = str; SplitByte = bytes; System.out.println ( "The String is: '" SplitStr "'; Splitbytes =" splitbyte);} public void splitit () {int loopcount; loopcount = (splitstr.length ()% splitbyte == 0)? (Splitstr.length () / splitbyte) :( splitstr.length ) / Split byte 1); System.out.Println ("Will Split INTO" LoopCount; for (INT i = 1; i <= loopcount; i ) {if (i == loopcount) {system.out. Println (Splitstr.Substring ((i-1) * splitbyte, splitstr.length ()));} else {system.out.println (splitstr.substring ((i-1) * splitbyte, (i * splitbyte)))) }}} public static void main (STRING [] args) {splitstring ss = new splitstring ("TEST DD text DSAF in Men's 3443N China 43 Chinese 0ewldfls = 103", 4); ss.splitit (); } 8, Java multi-thread programming. Write a multi-thread program with Java, such as writing four threads, two plus 1, two to one variable minus one, output. I hope everyone will make up, thank you 9, String and StringBuffer. A: The length of String is invisible, and the length of StringBuffer is variable. If you use the content in the string, especially when you want to modify, use StringBuffer, if you finally need String, use StringBuffer's toString () method JSP aspect 1, what built-in objects do you have? A: JSP has the following 9 basic built-in components (can correspond to the six internal components of the ASP): Request User Request, this request will contain the parameter page of the Get / POST request response to the user's response to the pageContext page The attribute is here to manage the session period Application Servlet in the Session period Application Servlet, which is being executed. What is the role? A: JSP has the following six basic action JSP: include: Introduction: 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 Tag 3, Dynamic Include and Static Include in JSP according to the Java plugin according to the browser type? A: Dynamic include uses JSP: include Page = "incrude.jsp" flush = "true" /> It always checks the changes in the file included, suitable for using dynamic pages, and can bring The parameter static include uses the incrude pseudo code, which does not check the changes in the file included, suitable for use in the static page <% @ include file = "incruded.htm"%> 4, what is the two types of jump mode? What is it? Difference? A: There are two kinds, which are: 4, Servlet basic structure public class ServletName extends HttpServlet {public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {} public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {}} Jdbc, Jdo aspect 1 You may let you write a JDBC even Oracle program and implement data queries. A: Package hello.ant; import java.sql. *; Public class jdbc {string dburl = "JDBC: Oracle: Thin: @ 127.0.0.1:1521:0.0.1:1521:orcl "; string theuser =" admin "; string thepw =" manager "; connection c = null; statement conn; result} = null; public jdbc () {Try {class.forname (" Oracle. JDBC.Driver.Oracledriver "). NewInstance (); C = DriverManager.getConnection (dburl, theuser, thepw); conn = c.createstatement ();} catch (Exception E) {E.PrintStackTrace ();}} public boolean executeUpdate (String sql) {try {conn.executeUpdate (sql); return true;} catch (SQLException e) {e.printStackTrace (); return false;}} public ResultSet executeQuery (String sql) {rs = null; try { RS = conn.exe CATEQUERY (SQL);} catch (squexception e) {E.PrintStackTrace ();} return}} public void close (); c.close ();} catch (exception e) { E.PrintStackTrace ();}} public static void main (string [] args) {resultset {RST RS; JDBC conn = new jdbc (); rs = conn.executeQuery ("select * from test"); try {while (RS. Next ()) {system.out.println (rs.getstring ("id")); system.out.println (rs.getstring ("name"));}} Catch (Exception E) {E.PrintStackTrace () ;}}} 2, the role of class.forname? Why is it to use? A: Call this access Returns an object that is specified by a string class name. 3. What is JDO? A: JDO is a new specification for the Java object persistence, which is a referred to as Java Data Object, and is also a standardized API for accessing objects in a 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. 4. Subject solution in Oracle's large amount of data. Generally, the ID method is used, and there is a three-layer nested method. A: One page method <% int i = 1; int number = 14; string pages = request.getParameter ("page"); int currentpage = 1; currentpage = (Pages == NULL)? (1): {Integer .PARSEINT (PAGES)} SQL = "SELECT Count (*) from Tables"; ResultSet RS = DBLINK.EXECUTEQUERY (SQL); while (rs.next ()) i = rs.Getint (1); int intelectCount = 1; ? intPageCount = (i% numPages == 0) (i / numPages) :( i / numPages 1); int nextPage; int upPage; nextPage = currentPage 1; if (nextPage> = intPageCount) nextPage = intPageCount; upPage = CurrentPage-1; if (UPPage <= 1) UPPAGE = 1; rs.close (); SQL = "Select * from Tables"; rs = dblink.executeQuery (SQL); i = 0; While ((i private String currentElement = null; private String currentValue = null; public void setTable (Hashtable table) {this.table = table;} public Hashtable getTable () {return table;} public void startElement (String tag, AttributeList attrs) throws SAXException { currentElement = tag;} public void characters (char [] ch, int start, int length) throws SAXException {currentValue = new String (ch, start, length);} public void endElement (String name) throws SAXException {if (currentElement. Equals (name)) Table.Put (Currentelement, CurrentValue);}} JSP content display source code, saxml.jsp: