1) Which Java component is responsible for converting bytecode (.class code) into instructions that the operating machine can execute, ensuring code portability? a) JVM (Java Virtual Machine) b) JDK (Java Development Kit) c) IDE (Integrated Development Environment) d) JRE (Java Runtime Environment) 2) What is the correct signature (declaration) of the main method (entry point) in a Java application? a) public void main(String[] args) b) private static int main(String[] args) c) static void main(String args[]) d) public static void main(String[] args) 3) After compiling a Java source file (.java), what is the generated intermediate file that contains the bytecode? a) .out file b) .jar file c) .exe file d) .class file 4) Which Object-Oriented Programming (OOP) principle in Java is implemented using access modifiers (private, public, etc.) to protect and control an object's internal state? a) Abstraction b) Encapsulation c) Polymorphism d) Inheritance 5) In Java, which of the following primitive data types is used to store whole numbers and is the most commonly used type (32 bits)? a) float b) double c) int d) String 6) Which keyword is used in Java to allocate memory and instantiate a new object of a class, calling the constructor? a) class b) void c) new d) this 7) In terms of OOP in Java, what best describes the concept of Inheritance? a) The requirement that a class implements all methods defined in an interface. b) The ability of one class (subclass) to acquire the attributes and methods of another class (superclass). c) The process of converting data types through an explicit cast. d) Bundling data and methods into a single unit while keeping implementation details hidden. 8) What is the default value that an instance variable (non-local) of type boolean receives if it is not explicitly initialized? a) null b) false c) true d) 0 (zero) 9) What fundamental characteristic of Java allows compiled code to be executed on any operating system that has the Java Virtual Machine (JVM) installed? a) Garbage Collection b) Object-Oriented Programming c) Strong Typing d) Platform Independence (Portability) 10) In Java, all code must be contained within which fundamental structure? a) Method b) Class c) Variable d) Object
0%
Java
共享
共享
共享
由
Whatever26662
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?