华为Java笔试题一.doc
文本预览下载声明
华为Java笔试题一
Huawei Java pen item 1
Huawei Java pen test a single choice question
1. Java is redesigned from () language improvements.
A.A da
Biggest + +
C.P asacal
Db ASIC
Answer: B
Which of the following statements is correct ()
The a. Java program is compiled to generate the machine code
The b. Java program is compiled to produce byte code
C. Java programs are compiled to generate DLLS
D. None of the above is correct
Answer: B
The following statement is true ()
The constructor in class is not omitted
B. The constructor must have the same name as the class, but the method cannot have the same name
C. The constructor executes when an object is new
D. A class can only define a constructor
Answer: C
4. The package that provides Java access to database capabilities is ()
A. ava. SQL
B.j ava. Awt
SAN Antonio ava. Lang,
D.j ava. Swing
Answer: A
The following operations are in accordance with the law ()
A.
B.
C.i f
D. = answer: A
6. Execute the following program code a = 0; C = 0; Do {- c; A = a - 1; } while (a 0); And then the value of C is ()
A. 0
1 B.
C. - 1
D. dead circulation answer: C -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- this one problem If it is a while (a 0) {
- c; A = a - 1;
Thats choice A
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Which of the following statements is correct ()
A. The abstract modifier can modify fields, methods, and classes
B. The body part of the abstract method must be wrapped in a pair of curly braces
C. Statement of abstract methods, large brackets are optional
D. declare that the abstract method cannot be written in brackets
Answer: D
The following statement is correct -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The form parameter can be considered local variable
B. Formal parameters can be m
显示全部