Free Software Design and Architecture MCQs with Answers
493 Software Design and Architecture MCQs from Software Engineering, each with the correct answer and a written explanation of why it is correct. Free and unlimited, with no account needed.
Last updated
493 questions · page 3 of 25
- 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- A. Prints 2.5
- B. Raises an exception
- C. Raises an error as STATIC is used as a variable which is a keyword
- D. None of these
Explanation: STATIC is a legal identifier because Java keywords are lowercase and STATIC is not a keyword.
Correct answer: Prints 2.5- A. Object
- B. Variable
- C. Class
- D. Method
Explanation: String is a predefined Java class used to represent sequences of characters.
Correct answer: Class- A. 0
- B. 1
- C. 2
- D. 3
Explanation: A running Java application has at least one thread, normally the main thread that begins execution of main().
Correct answer: 1- A. yield() method
- B. Suspend() method
- C. start() method
- D. resume() method
Explanation: The deprecated suspend operation pauses a thread, and resume() releases that suspended state.
Correct answer: resume() method- A. signed
- B. unsigned
- C. Both of the above
- D. None of these
Explanation: Java's byte, short, int, and long primitive integer types all use signed two's-complement representation.
Correct answer: signed- A. println
- B. final
- C. super
- D. static
Explanation: A method declared with the `final` modifier cannot be overridden in a subclass.
Correct answer: final- A. java.io package
- B. java.lang package
- C. java.awt package
- D. java.util package
Explanation: `gc()` is associated with `System.gc()`, and the `System` class belongs to the `java.lang` package, which Java imports automatically.
Correct answer: java.lang package- A. A Boolean literal
- B. A Java keyword
- C. Same as value 0
- D. Same as value 1
Explanation: `true` is a Boolean literal in Java, alongside `false`; it is not a keyword and Java does not treat it as numeric 0 or 1.
Correct answer: A Boolean literal- A. Declare the method with the keyword public.
- B. Declare the method with the keyword private.
- C. Do not declare the method with any accessibility modifiers.
- D. Declare the method with the keyword public and private.
Explanation: A method with no access modifier has package-private access, so it can be used by classes in the same package but not by classes in other…
Correct answer: Do not declare the method with any accessibility modifiers.- A. java dissasamebler
- B. java header file
- C. java interpreter
- D. java compiler
Explanation: `javah` was the Java tool used to generate native-method header files, hence the intended expansion is Java header file.
Correct answer: java header file- A. java
- B. javac
- C. javap
- D. none of these
Explanation: `javac` is the Java compiler command: it translates `.java` source files into bytecode `.class` files.
Correct answer: javac- A. 8 bit
- B. 16 bit
- C. 32 bit
- D. 64 bit
Explanation: Java defines an int as a signed 32-bit primitive regardless of the machine or JVM implementation. Its range is -2^31 to 2^31 - 1.
Correct answer: 32 bit- A. 7 8
- B. 8 7
- C. 9 8
- D. None
Explanation: A leading zero makes an integer literal octal in Java, so 010 equals decimal 8 and 07 equals decimal 7.
Correct answer: 8 7- A. From within protected methods you do not have access to public methods.
- B. This method is only accessible from inside the class itself and from inside all subclasses.
- C. In a class, you cannot declare methods with a lower visibility than the visibility of the class in which it is defined.
- D. This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.
Explanation: A protected method is accessible within its own class and by classes in the same package, as stated in option d.
Correct answer: This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.60. JIT meaning ?
- A. just in time
- B. java in time
- C. join in time
- D. none of above
Explanation: JIT stands for Just-In-Time compilation, in which frequently executed bytecode is compiled into native machine code during program…
Correct answer: just in time