In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what are the Java pen test questions". In the daily operation, I believe many people have doubts about the Java pen test questions. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the questions of "what are the Java pen test questions?" Next, please follow the editor to study!
1. Java pen test questions single multiple choice questions
1.Java is improved and redesigned from the () language.
A.Ada B.Clearing + C.Pasacal D.BASIC
Answer: B
2. Which of the following statements is correct ()
A. Java program will generate machine code after compilation
B. Java program will generate byte code after compilation
C. Java program will generate DLL after compilation
D. none of the above is correct
Answer: B
3. The following statements are correct ()
A. constructor in class cannot be omitted
B. constructor must have the same name as class, but the method cannot have the same name as class
C. constructor executes when an object is new
D. A class can only define one constructor
Answer: C
4. The package that provides Java access to the database is ()
A.java.sql B.java.awt C.java.lang D.java.swing
Answer: a
5. The following operations are consistent with the method ()
A.Mrs. & B. C.if D.V. =
Answer: a
6. Execute the following program code
Axiomotor _ 0
Do {
-- c
A=a-1
} while (a > 0)
The value of C is ()
A.0B.1 C.Mel 1 D. endless cycle
Answer: C
7. Which of the following statements is true ()
A. the abstract modifier modifies fields, methods, and classes
B. the body part of an abstract method must be surrounded by a pair of curly braces {}
C. declare abstract methods and curly braces are optional
D. declare that abstract methods cannot be written in curly braces
Answer: d
8. The following statement is correct ()
A. formal parameters can be regarded as local variable
B. formal parameters can be modified by field modifiers
C. the formal parameter is the parameter that is actually passed when the method is called.
D. formal parameters cannot be objects
Answer: a
9. Which of the following statements is true ()
A. instance method can directly call the instance method of superclass
B. the instance method can directly call the class method of the superclass
C. instance methods can directly call instance methods of other classes
D. the instance method can directly call the class method of this class
Answer: d
Second, Java pen test questions multiple choice questions
The types of 1.Java programs are ()
A. Class (Class) B.Applet C.Application D.Servlet
2. The following statements are correct ()
A. environment variables can be specified when compiling source code
B. when compiling a program, the environment variables that can be specified do not include class path
C. javac can compile several Java source files at a time
D. javac.exe can specify the directory in which the compilation results will be placed (directory)
Answer: BCD
3. The following identifiers are illegal: ()
A.new B.$Usdollars C.1234 D.car.taxi
Answer: ACD
4. The following statements are wrong ()
A. an array is an object
B. arrays belong to a native class
C. int number= [] = {31 record23, 33, 43, 35, 63}.
D. the size of the array can be changed at will
Answer: BCD
5. There are () that can not be used to modify interface.
A.private B.public C.protected D.static
Answer: ACD
6. The following correct ones are ()
A. call by value does not change the value of the actual parameter
B. call by reference can change the reference address of the actual parameters
C. call by reference cannot change the reference address of the actual parameter
D. call by reference can change the content of the actual parameters.
Answer: ACD
7. The following statements are wrong ()
A. you can use this in a class method to call the class method of this class
B. when calling the class method of this class in the class method, you can call the
C. only class methods in this class can be called in class methods.
D. instance methods must not be called in class methods
Answer: ACD
8. The following statements are wrong ()
A. Java object-oriented language allows separate procedures and functions to exist
B. Java object-oriented language allows separate methods to exist
C. methods in the Java language are members of the class (member)
D. methods in Java must belong to a certain class (object), and calling methods are the same as procedures or functions
Answer: ABC
9. The following statements are wrong ()
A. java class files that can be successfully run by java.exe must have a main () method
B. J2SDK is Java API.
C. Appletviewer.exe can run .jar files with the jar option
D. java class files that can be successfully run by Appletviewer must have a main () method
Answer: BCD
3. Judging questions with Java pen
The name of the starting class in the 1.Java program must be the same as the file name where the class is stored. (.)
Answer: correct
2.Unicode uses 16 bits to represent a word. (.)
Answer: correct
3. Data types in native classes can be converted arbitrarily. (.)
Answer: wrong
At this point, the study of "what are the Java test questions" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.