0% found this document useful (0 votes)
21 views3 pages

Computer Science Tuition Test Paper 2024-2025

This document outlines a Class 9 ICSE Computer Science exam consisting of multiple choice questions, short answer questions, and output-based questions. It covers various Java programming concepts including variable naming, data types, loops, and exception handling. The exam is structured to assess students' understanding of Java fundamentals and programming logic.

Uploaded by

samkithjain2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Computer Science Tuition Test Paper 2024-2025

This document outlines a Class 9 ICSE Computer Science exam consisting of multiple choice questions, short answer questions, and output-based questions. It covers various Java programming concepts including variable naming, data types, loops, and exception handling. The exam is structured to assess students' understanding of Java fundamentals and programming logic.

Uploaded by

samkithjain2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Class 9 ICSE Computer Science

Time: 1 Hour

Marks: 40

Section A: Multiple Choice Questions (1 x 10 = 10 marks)

1. Which of the following is a valid Java variable name?

a) 123abc b) _name c) class d) -value

2. Which of the following data types is used to store a single character in Java?

a) int b) float c) char d) boolean

3. What is the output of the following code snippet?


java
Copy code
System.out.println(3 + 4 * 2);

a) 14 b) 11 c) 10 d) 7

4. Which of the following is used to create an object in Java?

a) class b) method c) constructor d) function

5. What does the following statement signify in Java?


java

int[] arr = new int[5];

a) Declare an array of integers of size 5

b) Declare an array of size 4

c) Declare 5 integer variables

d) Declare a variable arr and assign it the value 5

6. What is the keyword used to define a constant in Java?

a) final b) const c) static d) constant

7. In Java, which of the following loops will execute at least once?

a) for b) while c) do-while d) for-each


8. Which of the following is not a Java keyword?

a) static b) void c) public d) main

9. What will be the output of the following code snippet?


java
Copy code
int a = 10;

int b = 5;

a += b;

System.out.println(a);

a) 5 b) 10 c) 15 d) 50

10. Which of the following operators is used to check equality in Java?

a) = b) == c) != d) <=

Section B: Short Answer Questions (2 x 10 = 20 marks)

1. Define class and object in Java. How are they related?


2. What is the difference between a compiler and an interpreter?
3. Explain the concept of method overloading with an example.
4. What are the different types of access specifiers in Java? Explain each.
5. Explain the structure of a basic Java program with an example.
6. Describe the switch statement in Java with a code example.
7. What is an array? How do you declare and initialise an array in Java?
8. Differentiate between while loop and do-while loop in Java.
9. Explain the concept of inheritance in Java with an example.
10. What are exception handling mechanisms in Java? Briefly explain try-catch blocks.
Section C: Output-Based Questions (2 x 5 = 10 marks)
1.)What will be the output of the following code?

public class Test {


public static void main(String[] args) {
int num = 5;
for (int i = 1; i <= num; i++) {
System.out.print(i + " ");
}
}
}

2.)Predict the output of the following code snippet:

public class Demo {


public static void main(String[] args) {
int a = 3;
int b = 7;
int c = a++ + ++b;
System.out.println("a: " + a);
System.out.println("b: " + b);
System.out.println("c: " + c);
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy