All Free Software Engineering MCQs with Answers

Every Software Engineering question in the bank, across all chapters, each with the correct answer and a written explanation. Free and unlimited, with no account needed.

1,731 questions · page 12 of 87

  • A. overloading
  • B. overriding
  • C. cloning
  • D. coping

Explanation: Cloning means creating a copy of an existing object, usually through Java's `clone()` mechanism or a similar copying method.

Correct answer: cloning
  • A. Constructor
  • B. Destructors
  • C. Variable
  • D. Object

Explanation: A constructor has the same name as its class and declares no return type, not even `void`; it initializes a newly created object.

Correct answer: Constructor
  • A. Synchronized methods
  • B. Asynchronized methods
  • C. Serialized methods
  • D. None of above

Explanation: A synchronized method permits only one thread at a time to execute the protected method for the relevant object lock.

Correct answer: Synchronized methods
  • A. short, 8
  • B. byte, 8
  • C. short, 16
  • D. short, 16

Explanation: In Java, `byte` is the smallest signed integer primitive type and occupies 8 bits. `short` is larger, occupying 16 bits.

Correct answer: byte, 8
  • A. throw
  • B. throws
  • C. extend
  • D. implements

Explanation: A class uses `implements` to provide the methods required by an interface, as in `class A implements I`.

Correct answer: implements
  • A. arrayName[] p = new arrayName[5];
  • B. arrayName p[][] = new arrayName[2][];
  • C. arrayName[] p [];
  • D. arrayName p[5];

Explanation: Java allows the brackets to appear after the type or variable, and an incomplete second dimension is valid in a declaration.

Correct answer: arrayName p[5];
  • A. token
  • B. string
  • C. literal
  • D. operator

Explanation: A token is the smallest meaningful lexical unit in a Java program, such as a keyword, identifier, operator, or literal.

Correct answer: token
  • A. Java
  • B. javap
  • C. javac
  • D. none of above

Explanation: The java command launches the JVM and runs compiled Java bytecode, while javac compiles source code and javap disassembles class files.

Correct answer: Java
  • A. Single
  • B. Mulilevel
  • C. Hirarchical
  • D. Multiple

Explanation: Java supports single, multilevel, and hierarchical inheritance through classes, but it does not allow a class to extend multiple classes.

Correct answer: Multiple
  • A. java.lang package
  • B. java.util package
  • C. java.awt package
  • D. java.io packageDevelopment Tools

Explanation: Thread is part of java.lang, which is imported automatically into every Java source file.

Correct answer: java.lang package
  • A. Overriding
  • B. Overloading
  • C. Constructor
  • D. none of these

Explanation: Overloading means defining methods with the same name but different parameter lists, allowing different inputs to select different…

Correct answer: Overloading
  • A. 5
  • B. 6
  • C. 7
  • D. 8

Explanation: Java has eight primitive types: byte, short, int, long, float, double, char, and boolean.

Correct answer: 8
  • A. 127
  • B. -127
  • C. 129
  • D. -129

Explanation: A byte can hold values from -128 to 127, so incrementing 127 wraps to -128 and the second increment produces -127.

Correct answer: -127
  • A. 32 and 64
  • B. 64 and 64
  • C. 32 and 32
  • D. 64 and 32

Explanation: Java specifies float as a 32-bit single-precision type and double as a 64-bit double-precision type.

Correct answer: 32 and 64
  • A. java.util package
  • B. java.io package
  • C. java.lang package
  • D. java.awt package

Explanation: Java's standard collection interfaces and implementations, such as List, Set, Map, ArrayList, and HashMap, are primarily provided in…

Correct answer: java.util package
  • A. Two type are compatible and size of destination type is equal of source type.
  • B. Two type are compatible and size of destination type is larger than source type.
  • C. Two type are compatible and size of destination type is shorter than source type.
  • D. All of the above

Explanation: Automatic conversion is widening conversion: the source and destination types must be compatible, and the destination must be able to…

Correct answer: Two type are compatible and size of destination type is larger than source type.
  • A. Multiple inheritance
  • B. Multilevel inheritance
  • C. Hierarchical inheritance
  • D. None of above

Explanation: Java classes cannot extend multiple classes, but a class can implement multiple interfaces, which provides multiple inheritance of type…

Correct answer: Multiple inheritance
  • A. Classes and Interfaces
  • B. Classes
  • C. Editing tools
  • D. Editing tools and Interfaces

Explanation: A Java package groups related classes and interfaces under a common namespace, helping organization, access control, and avoidance of name…

Correct answer: Classes and Interfaces
  • A. Input stream class
  • B. Object class
  • C. Math class
  • D. None of above

Explanation: pow() is a static method of Java's Math class and computes one number raised to the power of another.

Correct answer: Math class
  • A. JNI
  • B. FJI
  • C. NJI
  • D. JFI

Explanation: JNI, or Java Native Interface, allows Java code to invoke native code and allows native applications to invoke Java methods through the…

Correct answer: JNI