CISCE Board - ICSE Class 9

Java Programming Foundation question bank (Computer Applications)

Practice 434 free CISCE Board - ICSE Class 9 Computer Applications - Java Programming Foundation questions with answers and step-by-step solutions.

Q1.

Constructors & Overloading: In 'Object-Oriented Programming (OOP) Principles: Encapsulation, Inheritance, Polymorphism', what distinguishes a constructor from a method?

(A)
Same name as the class, no return type (not even void), automatically invoked upon object instantiation (Object-Oriented Programming (OOP) Principles: Encapsulation, Inheritance, Polymorphism)
(B)
Requires an int return type
(C)
Must be declared private always
(D)
None of these
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Q2.

Arrays (Sorting & Searching): In 'Object-Oriented Programming (OOP) Principles: Encapsulation, Inheritance, Polymorphism', what is the best-case time complexity of Binary Search on a sorted array?

(A)
$O(1)$ when key is at the midpoint, and worst-case $O(\log n)$ (Object-Oriented Programming (OOP) Principles: Encapsulation, Inheritance, Polymorphism)
(B)
$O(n^2)$
(C)
$O(n)$ always
(D)
None of these
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Protected Questions

Unlock All 47 Questions in Java Programming Foundation

Log in or sign up free to access every question with complete solutions, create chapter practice tests, and track your performance.

Sign up free to access all 47 questions

Unlock every Java Programming Foundation question, generate papers, and practice at your own pace.