[OCAJP] 保护与隐藏变量在类别内
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class? A. Encapsulation B. Inheritance C. Abstraction D. Instantiation E. Polymorphism
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
Java 编程语言的教学与范例,包含语法观念、算法实作与桌面程序开发,并收录大量 Java 认证考试(OCAJP、OCPJP)的题目解析。
共 403 篇文章
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class? A. Encapsulation B. Inheritance C. Abstraction D. Instantiation E. Polymorphism
What is the result? A. Compilation fails B. The code compiles, but does not execute. C. Paildrome D. Wow E. Mom
What is the result? A. x:1 y:2 x:3 y:4 B. x:0 y:0 x:3 y:4 C. x:1 y:2 x:0 y:0 D. x:0 y:0 x:0 y:0
Which three lines fail to compile? A. Line 7 B. Line 8 C. Line 9 D. Line 10 E. Line 11 F. Line 12
How many objects are created in the memory runtime? A. 1 B. 2 C. 3 D. 4
Which statement is true? A. Only the A.Java file compiles successfully. B. Only the B.java file compiles successfully. C. Only the C.java file compiles successfully. D. The A.Java and B.java files co...
What is the proper way to defined a method that take two int values and returns their sum as an int value? A. int sum(int first, int second) { first + second; } B. int sum(int first, second) { return...
Which code fragment, when inserted at line n1, enables the code to print Hank? A. checkAge(iList, () -> p.getAge() > 40); B. checkAge(iList, Person p -> p.getAge() > 40); C. checkAge(iList, p -> p.ge...
What is the result? A. 011 B. 012 C. 123 D. 000
What is the result? A. int main 1 B. Object main 1 C. String main 1 D. Compilation fails E. An exception is thrown at runtime