1. In Java, the () class provides the location of the local file system and basic operations on a file or directory and its attributes ( D )
A, FileInputStream
B, FileReader
C, FileWriter
D, File
Analytical:
FileInputStream provides a byte read of the file;
FileReader provides the character reading of the file;
FileWriter provides a character write to the file;
File provides basic operations on files, including operations on deletions, file paths, and so on.
2, the following description of the servlet and CGI, the wrong word is? D )
A, the servlet is in a server process, and it runs its service method in a multithreaded manner
B, CGI creates a new process for each request and destroys the service when it is completed
C, servlet is more user-friendly than CGI, it provides a number of utility routines, such as automatically parsing and decoding HTML form data, reading and setting HTTP headers, processing cookies, tracking session state, etc.
D, CGI is more portable than servlet, and almost all major servers support CGI directly or via plugins
Analytical:
Select d:cgi is not portable, CGI applications written for a particular platform can only run in this environment. Each CGI application exists in a process that is activated by a client request and is uninstalled after the request is serviced. This mode causes high memory, CPU overhead, and cannot serve multiple customers in the same process.
3. A description of the configuration meaning of the following spring declarative transaction is wrong C)
A. A configuration template that defines declarative transactions
B. Use read-only transactions for Get methods
C, lack of sessionfactory attribute injection
D. When configuring a proxy for a bean that requires transaction management, refer to this configuration template through parent, with the following code:
<bean id= "petbiz" parent= "txproxytemplate" > <property name= "target" ref= "Pettarget"/></bean>
4, in myjsp.jsp, the following code is wrong to say:(
A ) <%@ page language= "java" import= "java.util.*" errorpage= "error.jsp" iserrorpage= "false"%>
A, this page can use the exception object
B, the page exception will turn to error.jsp
C, when the ErrorPage property exists, Iserrorpage is the default of False
D, error.jsp page must have a Iserrorpage property and a value of true
Analytical:
The page has the Iserrorpage property and the value is false, and the exception object cannot be used
Abde )
A Interruptedexception is thrown.
B, the thread executes a wait () call.
C, the thread constructs a new thread.
D, A thread of higher priority becomes ready.
E, the thread executes a waitforid () call on a mediatracker.
Analytical:
A exception, stop b hibernation, stop execution D blocking, stop executing e block, then stop execution
Java Special Interview Training (i)