Class X Question Paper Section A
[Multiple Choice Questions]
(20 Marks)
Choose one of the best option from the choice:-
Chapter Wise
Revision of Class IX
CHAPTER AT A GLANCE :
Points to Remember
Chapter 1: Introduction to Object Oriented Programming
1. Java is a ________ language.
(a) High level (b) Low Level (c) Middle Level (d) None
Ans : (a) High Level Langauge
2. JDK means __________.
(a) Java Deployment Kit (b) Java Development Kit (c) Java Device Kit (d) Java Document Kit
Ans:(b) Java Development Kit
3. Java does not support __________.
(a) Multiple Inheritance. (b) Overloading, (c) Overriding (d) None
Ans: (a) Multiple Inheritance.
4. There are no pointers in Java.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True.
5. Java files are saved with ______extension.
(a) .txt (b) .java (c) .exe (d) .bmp
Ans: (b) .java
6. A class in Java is saved with _____ extension.
(a) .txt (b) .java (c) .class (d) .bmp
Ans: (c) .class
7. ______ and indentation make the program more readable.
(a) Comments (b) keywords (c) identifiers (d) none
Ans: (a) Comments
8. A program written in Java is portable and reusable.
(a) Java (b) C++ (c) Oracle (d) FORTRAN
Ans: (a) Java
9. There may be three types of errors in a program; ________, logical error and runtime erro
(a) Pointer (b) syntax error (c) systemetic (d) unsystemetic
Ans: (b) syntax error
10. _______ are the most difficult errors to locate.
(a) Logical errors (b) syntax error (c) run time error (d) none
Ans: (a) Logical error
11. Removing errors from a program is called _________.
(a) debugging. (b) hunting (c) removing (d) identifying
Ans: (a) debugging
12. A program with _______ cannot compile.
(a) Logical errors (b) syntax error (c) run time error (d) none
Ans: (b) syntax error
13. A program with _______ can compile but will give wrong output.
(a) Logical errors (b) syntax error (c) run time error (d) none
Ans: (a) Logical error
14. A program with _______ can compile but it will not execute.
(a) Logical errors (b) syntax error (c) run time error (d) none
Ans: (c) run-time error
15. A Java program must have a ________.
(a) main method (b) sub method. (c) module method. (d) user friendly method.
Ans: (a) main method
16. Every statement in Java terminates with a ________.
(a) brackets {} (b) ? Question marks (c) semicolon(;) (d) $ sign
Ans: (c) semicolon(;)
17. A program always starts with a _______.
(a) class name (b) object name (c) package name (d) constructor name
Ans: (a) class name
18. The name of the class is followed by the keyword _______.
(a) class (b) void (c) static (d) final
Ans: (a) class
19. A program can have more than one class.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
20. A program can have several methods.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
21. Command to compile a Java program is _______.
(a) javac (b) javap (c) java (d) javam
Ans: (a) javac
22. Command to execute a compiled Java program is java.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
23. Comments can be in a single line or multiple lines.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
24. A class is called a collection of objects.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
25. A class is also called a factory of objects.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
26. Wrapping of data and methods in a single unit is called encapsulation.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
27. A module is a small program in itself which can be tested and can do a specified task.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
28. An attribute is a type of information that a Java class consists.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
29. An attribute determines the qualities of the objects belonging to a particular class. 30. An object is an instance of a class.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
Points to Remember
CHAPTER AT A GLANCE
REVISION OF CLASS IX
Chapter 2: Values and Data Types
1. There are ______primitive data types in Java.
(a) 7 (b) 8 (c) 9 (d) 10
Ans: (b) 8
2. A constant does not change its value in the entire program.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
3. A constant is also called a literal.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
4. In-built data types are called primitive data types.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
5. Byte, short, long, int, float, double, char and boolean are primitive data types.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
6. Array is non-primitive data type.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
7. Class is a non-primitive data type.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
8. Range of short data type is -32768 to +32767.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
9. A number having integer and fractional part is called a floating point number.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
10. The precision (decimal size) of float data type is 7 digits.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
11. The precision of double data type is 15 digits.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
12. String value is enclosed in double quotes.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
13. Character value is enclosed in single quotes.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
14. Unicode is the name given to character set of Java.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
15. A variable is a value that can change in a program.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
16. Local variable is available only in a part of the program and its scope is local.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
17. Global variable is available to the entire program and its scope is global.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
18. The default value for string is hull.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
19. The default value for double type is 0.0.d.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
20. The default value for boolean is false.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
21. The default value for char is '\u0000'.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
22. The default values for byte, short and int are 0. (without decimal).
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
23. The default value for long is OL.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
24. The default value for float is 0.0f.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
25. Size of int data type is 4 bytes.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
26. Size of byte data type is 1 byte.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
27. Size of short data type is 2 bytes.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
28. Size of long and double data type is 8 bytes each.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
29. Size of char data type is 2 bytes.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
30. Size of boolean data type is 1 byte.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
31. Size of float data type is 4 bytes.
Points to Remember
CHAPTER AT A GLANCE
REVISION OF CLASS IX
Chapter 3: Operators and Expressions in Java
1. An operator is a symbol which represents and action or process.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
2. Operators are used for performing various operations.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
3. The operations can be mathematical, relation or logical.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
4. An operand is an object which is capable of being manipulation.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
5. Operators in Java can be classified into 6 types:
• Arithmetic Operators
• Relational Operators
• Unary Operators
• Assignment Operators
• Logical Operators
• Bitwise Operators
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
6. Arithmetic operators are used to perform arithmetic operations on variables and data.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
7. Arithmetic operators are:
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus (Remainder)
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
8. There are three types of operators in Java based on the number of operands.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
9. They are: Unary operator, Binary operator and Ternary operator
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
10. An operator that acts on a single operand is called unary operator. It uses a single variable. 9. An operator that acts on two operands is called binary operator. It uses two variables.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
11. An operator that acts on three operands is called ternary operator. It uses three variables. 11. +++, are unary operators.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
12. In ++, ++ is a prefix increment operator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
13. in a++, ++ is a postfix increment operator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
14. In-a,-is a prefix decrement operator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
15. in a-,-is a postfix decrement operator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
16. In a prefix increment or decrement operator, the rule of evaluation is: First change the value anthen use it.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
17. In a post increment or decrement operator, the rule of evaluation is: First use the value and the change it.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
18. Assignment operators are used in Java to assign values to variables.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
19. Assignment operators are: =,+=,=,=, /=,%=.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
20. Relational operators are used to check the relationship between two operands.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
21. ==,=, >, <, >, <= are the six relational operators in Java.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
22. Logical operators are used to check whether an expression is true or false.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
23. AND, OR, NOT are the three logical operators in Java
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
24. The AND operator is represented by &&.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
25. The OR operator is represented by | |.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
26. The NOT operator is represented by !.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
27. Bitwise operators in Java are used to perform operations on indivisual bits.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
28.The ternary oerators in Java are used to perform operations on individual bits.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
29. The syntax for ternary operator is :
variable=Expression ? expression 1 : expression 2;
30. An expression in Java is a combination of operators and operands that is used to perform mathematical or logical calculations.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
31. If a keyword is used as an operator, it is called named operator. The named operator is instanceof.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
32. The order of evaluation in which operators are evaluated is calld precedence of operator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
33. Parenthesis have the highest order of evaluation.
CHAPTER AT A GLANCE
REVISION OF CLASS IX
Chapter 4: Input and Outputs in Java
Points to Remember
1. The Scanner class can parse text for primitive data type using regular expressions.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
2. The Scanner class can read files, String objects and input streams.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
3. The Scanner is a member of java.util. package.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
4. A token is a series of character that ends with whitespaces.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
5. A white space character can be a blank, a tab character, a carriage return or end of the file.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
6. Whitespaces character acts as seperator.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
7. The next() method returns the next input value as a string.
CHAPTER AT A GLANCE
REVISION OF CLASS IX
Chapter 5: Conditional Constructs in Java
Points to Remember
1. The Conditional Statement are mostly used in decision-making. These statements takes a decisionon the basis of some conditions.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
2. The Conditional Statement are also reffered as branching statement because the program takes a decision based on the result of the assessed condition.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
3. Java provides three types of conditionals
if.------- if else------- if else if
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
4. Use if to specify a block of code to be executed, if a specified condition is true.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
5. Use else to specify a block of code to be executed, if the same condition is false.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
6. Use else if to specify a new condition to test, if the first condition is false.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
7. A conditional statement begins with the keyword if folloed by parenthesis.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
8. A expression is placed inside the parenthesis, which is evaluated when the conditional statement is reached. The result of the evaluation is a boolea value.
(a) True (b) False (c) Not Known (d) None
Ans: (a) True
No comments:
Post a Comment