Wrong problem analysis:
The error handling in 1:java is implemented by the exception handling model, so the error that the exception handling module can handle is:
A: Run-time error
B: Logic Error
C: Syntax error
D: Internal Error
The correct answer is: A
Parsing: Runtime exceptions are runtimeexception classes and their subclass exceptions, such as NullPointerException, indexoutofboundsexception, etc., these exceptions are not checked exceptions, the program can choose to capture processing, can also not be processed. These exceptions are usually caused by a program logic error, and the program should avoid this kind of exception as much as possible from a logical point of view.
2:java, what () belongs to a non-check exception.
A:java.lang.arrayindexoutofboundsexception
B:java.io.ioexception
C:java.lang.arithmeticexception
D:java.lang.classnotfoundexception
The correct answer is: ACD
Examine the understanding of exception handling. Typically, Java is a non-check exception (the compiler does not require a forced disposition exception): Includes a run-time exception (runtimeexception with its subclasses) and error. The Java compiler does not require you to catch it or must continue to throw it, but the checked exception (check for exceptions) requires that you must either capture or continue to throw in the method. The Java.lang.ArithmeticException class is a subclass of RuntimeException, and throws an Java.lang.ArithmeticException exception when an operating condition of an exception occurs. The arrayindexoutofboundsexception array is out of bounds and also belongs to a run-time exception. The subject should choose AC.
3:javascripts is a set of elements that obtain a uniform name through the () method.
A:getelementsbyid
B:getelementbyid
C:getelementsbyname
D:getelementbyname
The correct answer is: C
The Getelementsbyname method under the Document object can get a set of elements of the same name, so select C
4: About the properties of the log4j configuration file, the following statement is wrong: ()
A:%p the priority of the output log information, that is, debug,info,warn,error,fatal
b:%d the date or time of the output log point, such as%d{yyy MMM DD Hh:mm:ss,sss}
c:%% output A%
D:%l line numbers in the output code
The correct answer is: D
This topic is about the use of log4j profile properties. %l indicates where the output log event occurs, so option D is wrong and the other options are correct, so the answer is option D.
The default method in 5:http is: ()
A:put
B:get
C:post
D:trace
The correct answer is: B
There are two types of requests submitted, one is get and one is post. So the Doget () method is called to handle the GET request.
6: In jquery, adding text before the IMG element, inserting text successfully, the following code is correct:
a:$ ("img"). After ("Insert text succeeded")
b:$ ("img"). Before ("Insert text succeeded")
c:$ ("img"). Append ("Insert text succeeded")
d:$ ("img"). Prepend ("Insert text succeeded")
correct answer selection: B
This topic examines the application of the Before () method in jquery. A is inserted after the selected element, C is inserted at the end of the selected element, D is inserted in the front of the selected element, and only B is inserted before the selected element.
7: In the HTML page, the following description of the Document object is wrong ()
The A:document object is used to inspect and modify text in HTML elements and documents.
B:document object is used to retrieve information about HTML documents in a browser window
C:document object provides a list of recently visited URLs for customers
The Location property of the D:document object contains information about the current URL
The correct answer is: C
This topic examines the document object, the C answer is the function of the history object, so the description of the error should choose c.
8: The following javascripts code in the page:
var a=1000;
b=2014;
function test ()
{
b=2000;
}
Test ();
alert (A+B);
The result of the output is:
a:3014
B: ' 1000undefined '
c:1000
d:3000
The true answer is: D
The custom method test assigns a value of 2000 to B, and then calls the method, so at this point the value of B is 2000, the output a+b The result is 3000, so choose D
9: About the life cycle of the servlet, the right thing to say is:
(1): Call the init () method
(2): Call the Detory () method
(3): Call the Service () method
(4): Create an instance of the servlet
A: (1) (2) (3) (4)
B: (1) (4) (3) (2)
C: (4) (1) (3) (2)
D: (4) (1) (2) (3)
The correct answer is: C
Servlet life cycle: Create a servlet instance call the Init () method call Service ( ) method call Destroy ( ) method answer c correct
10: In jquery, the options for the following event statements are wrong: ()
The A:bind () method binds events for specific elements of each matching element
B:unbind () is the reverse operation of the bind () method, removing the bound event from each matching element
The C:live () method can only bind events to loaded static page elements
The first parameter of the D:bind (TYPE,FN) method is a string that contains one or more types, separates multiple events by a space, and the second parameter, FN, binds to the handler on each matching element
Correct answer: C
The subject is a test of the bind () and Unbind () methods. C option Error, the bind () method can bind events to dynamically generated elements.
11: In C #, the following code defines a structure with the wrong code number: ()
struct student{
1:public string name= "XX";
2:public Student ()
{}
3:public void Say ()
{
Console.WriteLine ()
}
}
A:1
B:2
C:3
D: No errors
The correct answer is: AB
This topic examines the C # structure. struct variables do not need to be assigned, methods must be implemented by the method body. So select AB
(select two items)
A:
The correct answer is: BC
This is the API for manipulating the DOM in jquery. The HTML () method is used to get the HTML content of an object, and if there are multiple matching values, only the first one is returned, so option A is wrong: the HTML ("content") method is used to set the HTML content of an object, if there are multiple matches , the HTML content of all matching objects is reset, so option B is right. The. Text () is used to return the text content of all matching objects, so option C is right. The. Val () method is used to get the value of the form element, and the P label is not a FORM element, so option D is wrong.
13: In the development of C # language program The following about virtual methods and abstract methods are correct:
A: Virtual method can not have method body, abstract method to have method body, even a semicolon
B: Virtual methods and abstract methods must override the Quilt class
C: Virtual methods can exist in any class, abstract methods can only be stored in abstract classes
D: Virtual methods can exist in abstract classes
14:
(Select an item
A:
B:
C:
D:
- ${MAP.2} Compile error, to access the value corresponding to key in map, need to pass $map["key"]
First Test of S2 final exam