0% found this document useful (0 votes)
3 views7 pages

SDAS MCQ Worksheet Java Class10

This document is a multiple-choice question worksheet for Class X students studying Computer Applications, covering various topics related to the Java programming language. It includes 50 questions with options and an answer key for quick verification. The questions address programming concepts, data types, operators, and Java syntax.

Uploaded by

sourishdas584
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)
3 views7 pages

SDAS MCQ Worksheet Java Class10

This document is a multiple-choice question worksheet for Class X students studying Computer Applications, covering various topics related to the Java programming language. It includes 50 questions with options and an answer key for quick verification. The questions address programming concepts, data types, operators, and Java syntax.

Uploaded by

sourishdas584
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

SDAS INSTITUTION

MCQ WORKSHEET
Class: X Subject: Computer Applications Full Marks: 50 Time: ______ Date:
29.03.2026

Name: ___________________________
Roll No.: ________________________
Section: _________________________

SECTION A
Choose the correct option in each question. All questions are based only on the uploaded book
content.
1. The programming language developed by James Gosling at Sun Microsystems was
initially named:
(A) JDK
(B) Oak
(C) BlueJ
(D) OAKS
2. According to the book, Java programs can be written in two forms:
(A) Machine and Assembly
(B) Source and Object
(C) Standalone and Applet
(D) Package and Interface
3. The machine-independent intermediate code produced by the Java compiler is:
(A) Source code
(B) Object module
(C) Byte code
(D) Machine code
4. The component that loads byte code into memory and translates it as soon as Java is
loaded is:
(A) JDK
(B) JVM
(C) JRE
(D) AWT
5. Java is described in the chapter as a language that uses:
(A) Only a compiler
(B) Only an interpreter
(C) Neither compiler nor interpreter
(D) Both compiler and interpreter
6. Which package is imported by default in Java?
(A) [Link]
(B) [Link]
(C) [Link]
(D) [Link]
7. Which package contains the Scanner class?
(A) [Link]
(B) [Link]
(C) [Link]

SDAS Institution Page 1


(D) [Link]
8. The package mainly used for window toolkit and GUI operations is:
(A) [Link]
(B) [Link]
(C) [Link]
(D) [Link]
9. A package is best described as:
(A) a collection of logically related classes and interfaces
(B) a list of reserved words
(C) machine code generated by compiler
(D) an output window
10. Which of the following cannot be used as an identifier because it is a reserved word?
(A) totalMarks
(B) student1
(C) public
(D) speed_1
11. In the basic structure of a Java program, the class heading begins with the keyword:
(A) public
(B) main
(C) class
(D) static
12. Which statement about output methods is correct?
(A) print() moves the cursor to the next line
(B) println() leaves the cursor on the same line
(C) print() leaves the cursor on the same line
(D) both print() and println() behave identically
13. Which statement causes the cursor to move to the next line after displaying the output?
(A) [Link]()
(B) [Link]()
(C) [Link]()
(D) [Link]()
14. If int p = 25, q = 20; then [Link]("The sum of two numbers is " + (p + q));
will display:
(A) The sum of two numbers is 2520
(B) The sum of two numbers is 45
(C) 45 is the sum of two numbers
(D) The sum of two numbers is p + q
15. In Java, the smallest individual component of a program is called a:
(A) package
(B) token
(C) module
(D) parameter
16. Fixed values that do not change during execution are called:
(A) variables
(B) identifiers
(C) literals
(D) operators
17. Which of the following is NOT listed as a token category in the chapter?
(A) identifiers
(B) operators

SDAS Institution Page 2


(C) compiler
(D) keywords
18. Which of the following is correctly identified as a separator?
(A) &&
(B) { }
(C) +=
(D) !=
19. Which non-graphic character is represented by the escape sequence \n ?
(A) horizontal tab
(B) backspace
(C) new line feed
(D) carriage return
20. The escape sequence \t is used to insert:
(A) a backspace
(B) a horizontal tab
(C) a null character
(D) a double quote
21. The ASCII code range for uppercase English letters is:
(A) 48 to 57
(B) 65 to 90
(C) 97 to 122
(D) 0 to 32
22. The character encoding scheme used by Java for characters is:
(A) ASCII only
(B) EBCDIC
(C) Unicode
(D) Binary Coded Decimal
23. When all operands in an arithmetic expression are of the same data type, the expression
is called:
(A) mixed expression
(B) pure arithmetic expression
(C) explicit expression
(D) logical expression
24. In implicit type conversion, the result of a mixed-mode expression is generally promoted
to:
(A) the lowest data type present
(B) the type of the first operand
(C) the highest data type present
(D) character type only
25. Explicit conversion of one data type into another is known as:
(A) truncation
(B) promotion
(C) type casting
(D) parsing
26. Data types in Java are broadly classified into:
(A) local and global
(B) primitive and non-primitive
(C) constant and variable
(D) package and interface
27. Which primitive data type is used to store integers up to 8 bits?

SDAS Institution Page 3


(A) short
(B) int
(C) byte
(D) long
28. Which primitive data type is used to store integers up to 16 bits?
(A) byte
(B) short
(C) int
(D) float
29. Which primitive data type stores integer values up to 32 bits?
(A) short
(B) char
(C) int
(D) long
30. Which primitive data type is used to store large integers up to 64 bits?
(A) long
(B) int
(C) float
(D) double
31. Which data type is meant for fractional numbers with a comparatively smaller range?
(A) double
(B) long
(C) float
(D) char
32. Which data type is used for fractional numbers with a wide range of values, usually
stored in 8 bytes?
(A) byte
(B) double
(C) short
(D) boolean
33. Which of the following is a correct char literal?
(A) "A"
(B) 'A'
(C) A
(D) `A`
34. Which statement correctly initializes a boolean variable?
(A) boolean flag = "false";
(B) boolean flag = false;
(C) boolean flag = 'false';
(D) boolean flag = 0;
35. The null literal in Java is mainly used:
(A) to store a numeric zero
(B) to represent an object in memory
(C) to show that no object reference is assigned
(D) as a synonym for false
36. An identifier is a name used to identify:
(A) only variables
(B) only methods
(C) only classes
(D) classes, methods, objects and interfaces

SDAS Institution Page 4


37. If a variable is declared with the final keyword, it:
(A) must be initialized dynamically
(B) can be modified only once inside main()
(C) cannot change its value once assigned
(D) becomes a reserved word
38. Which of the following best illustrates declaration without initialization?
(A) int n = 5;
(B) boolean flag = true;
(C) int n;
(D) char ch = 'A';
39. Dynamic initialization means that a variable is initialized:
(A) only by default values
(B) at run time during execution
(C) before declaration
(D) only inside packages
40. Evaluate: int a = 8; a -= ++a + a++ + 4; The final value of a is:
(A) -14
(B) 14
(C) 22
(D) -22
41. Evaluate: int a = 12, b = 8; a *= ++a / 6 + b++ % 3; The final value of a is:
(A) 24
(B) 36
(C) 48
(D) 52
42. Evaluate: int x = 4; x += x++ * ++x % 2; The final value of x is:
(A) 0
(B) 4
(C) 8
(D) 24
43. Evaluate: int a = 48, b = 13; a += b++ * 5 / a++ + b; The final value of a is:
(A) 48
(B) 49
(C) 63
(D) 65
44. An operator that works on only one operand is called:
(A) binary operator
(B) unary operator
(C) relational operator
(D) logical operator
45. Operators that work on two operands are called:
(A) unary operators
(B) binary operators
(C) ternary operators
(D) nested operators
46. The conditional operator is also known as the:
(A) binary operator
(B) shift operator
(C) ternary operator
(D) postfix operator

SDAS Institution Page 5


47. Which relational operator tests "not equal to"?
(A) <>
(B) ^=
(C) !=
(D) ~=
48. In the expression (a > b) && (a > c), the result is true only when:
(A) at least one condition is true
(B) both conditions are true
(C) both conditions are false
(D) the first condition is false
49. When NOT, AND and OR appear together in a statement, the operator evaluated first is:
(A) OR
(B) AND
(C) NOT
(D) Assignment
50. For int a = 5, b = 3; max = (a > b) ? a : b; the value stored in max is:
(A) 3
(B) 5
(C) 8
(D) undefined

SDAS Institution Page 6


ANSWER KEY
Correct options are given with the corresponding answer text for quick verification.

Q Ans Answer Q Ans Answer


1 B Oak 26 B primitive and non-primitive
2 C Standalone and Applet 27 C byte
3 C Byte code 28 B short
4 B JVM 29 C int
5 D Both compiler and interpreter 30 A long
6 D [Link] 31 C float
7 A [Link] 32 B double
8 A [Link] 33 B 'A'
a collection of logically related classes and
9 A 34 B boolean flag = false;
interfaces
10 C public 35 C to show that no object reference is assigned
11 C class 36 D classes, methods, objects and interfaces
12 C print() leaves the cursor on the same line 37 C cannot change its value once assigned
13 D [Link]() 38 C int n;
14 B The sum of two numbers is 45 39 B at run time during execution
15 B token 40 A -14
16 C literals 41 C 48
17 C compiler 42 B 4
18 B {} 43 C 63
19 C new line feed 44 B unary operator
20 B a horizontal tab 45 B binary operators
21 B 65 to 90 46 C ternary operator
22 C Unicode 47 C !=
23 B pure arithmetic expression 48 B both conditions are true
24 C the highest data type present 49 C NOT
25 C type casting 50 B 5

SDAS Institution Page 7

You might also like