Java related basics (2) (reposted)

xiaoxiao2021-03-06  19

1. Briefly describe the difference between logic operation (&, |, ^) and conditional operation (&&, ||). (15 marks)

2. What is the result of running below? If there is any error, how to correct? (15 points) Interface a {int x = 0;} Class B {INT X = 1;} Class C Extends B IMplements a {public void PX ) {System.out.println (x); public static void main (String [] args) {new c (). Px ();}} 3. Brief details of Java Server Page and Servlet. (20 points)

The servlet is really an application that does not have an interface running on the server. It is a choice for Java technology to expand and enhance web server feature.

JSP technology mainly translates HTML (XML) into Java code and then executes in the server. Provide a convenient user interface for servlet.

4. Several forms of definition of xml documentation? What is the essence difference between them? What kind of way to parse XML documents? (20 points)

DOM and SAX analysis

5. Briefly describe the difference between SYNCHRONIZED and Java.util.Concurrent.locks.lock? (15 marks)

6. EJB specification specified what prohibited in EJB? (15 points) 7. Finally, there is a test of your eyes: public string toString () {return this "@" this.hashcode ();} This TSTRING () method does not have unfair places?

(TSTRING method can actually output some information on any content you want to output)

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

New Post(0)