0% found this document useful (0 votes)
37 views4 pages

STD 12 Eng Computer 04 11 2024 CH 6 To 9

The document is a question paper for a Computer subject for 12th-grade students, covering chapters 6 to 9. It contains 99 multiple-choice questions related to Java programming concepts, including topics like object-oriented programming, data types, methods, and arrays. Each question has four options, and the total marks for the paper are 100.

Uploaded by

panjabimann785
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)
37 views4 pages

STD 12 Eng Computer 04 11 2024 CH 6 To 9

The document is a question paper for a Computer subject for 12th-grade students, covering chapters 6 to 9. It contains 99 multiple-choice questions related to Java programming concepts, including topics like object-oriented programming, data types, methods, and arrays. Each question has four options, and the total marks for the paper are 100.

Uploaded by

panjabimann785
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/ 4

OAJ INSTITUTE OF SCIENCE Dt.

:04/11/2024
Std: 12 ENG COMPUTER [MARKS : 100]
Chapter: 6 to 9 CPT - 02
1.Which symbol is used to add single line comment in Java?
a) / b) /* c) //* d) //
2. Which of the following are fundamental parts of object-oriented programming?
a) Method and class b) Object and class c) Object and method d) None
3. An inheritance model refers to which of the following relationship?
a) Is - a b) Has - a c) Have - a d) All of the given
4. In Java, length is a _________with string object.
a) Method b) Attribute c) Property d) All of the given
5. Which variable/s is/are initialized with default values?
a) Instance b) Class c) Both A & B d) None
6. In Java, a class name can be used to specify _________.
a) Type of variable in a b) Type of a formal c) Return type of d) All
declaration statement parameter function
7. The best way to provide data encapsulation is to make as much data as _______ as possible.
a) Package b) Protected c) Private d) Public
8. In which of the following braces, the subscript of an array is enclosed?
a) [ ] b) ( ) c) { } d) < >
9. Which method returns a string with all characters of invoking string converted to lowercase?
a) String toLowerCase() b) String toLower() c) Lowercase( ) d) All of these
10. Which symbol is used for composition relationship?
a) Filled diamond b) Empty diamond c) Filled triangle d) Empty triangle
11. Which method is used to fill the whole or partial array with specified value?
a) Sort b) Fill c) List d) Fill List
12. Which constructor is used to create a string object, "which is same as object specified in
argument"?
a) String (string literal) b) String ( ) c) String (char ary[ ]) d) String (string str onj)
13. In Object-oriented methodology, the focus is on which of the following entities?
a) Data b) Functions c) Objects d) All of the above
14. Which of the following is used to distinguish objects from each other?
a) Attributes b) States c) Behavior d) All of the above
15. Which of the following is not a visibility symbol?
a) ~ b) * c) # d) _
16. The way of programming can be divided into _________ categories.
a) 1 b) 2 c) 3 d) 4
17. Which of the following is enabled by data abstraction?
a) Data protection b) Data hiding c) To hide implementation d) All of these
details of method manipulating the data
18. With which of the following options polymorphism cannot be achieved?
a) Method overloading b) Operator overloading c) Data hiding d) All of these
19. An inheritance model refers to which of the following relationship?
a) is-a ‘relationship b) has-a relationship c) a-part-of relationship d) All of these
20. In _____________, the focus is on functions which operate on the data.
a) structure/ b) object based c) Both A and B d) None of these
procedural programming programming
21. Object contain _____________
a) data b) functionality c) Both A and B d) None of these
22. A _________ can be considered as a blueprint for various objects.
a) method b) class c) object d) member
23. OMG stands for _________.
a) Other Management b) Other Maintenance c) Object Management d) Object Maintenance
Group Group Group Group
24. _____________ is the example of abstract object.
a) concepts like date b) persons, cars, c) Both A and B d) None of these
and time computers
25. Behavior is called _______________.
a) function b) class c) method d) state
26. _____________ used to define common characteristic of object.
a) method b) attributes c) class d) function
27. The capability of using same names to mean different things in different contexts is called ____.
a) overriding b) overloading c) (A) or (B) d) none of these
28. _____________ shows the example of method
a) setBirthdate ( d:int, b) setBirthdate [ d:int, c) setBirthdate < d:int, d) setBirthdate { d:int,
m:int, y:int) : date m:int, y:int] : date m:int, y:int> : date m:int, y:int} : date
29. __________ provides security to the data.
a) composition b) aggregation c) data property d) encapsulation
30. ADT stands for _____________
a) Access Data Types b) Abstract Data Types c) Absolute Data Types d) Advanced Data Types
31. _____________ allows the methods to be redfined in sub class as per need.
a) sub class b) super class c) base class d) parent class
32. How many basic(primitive) data types are supported in java?
a) 2 b) 4 c) 8 d) 16
33. Which character set is used for char data type in java?
a) Unicode b) ASCII c) EBCIDIC d) All of these
34. JDK stands for __________ .
a) Java Development Kit b)JavaScript c) Javasource d) Javabytecode
Development Kit Development Kit Development Kit
35. What is the default value of Boolean type data?
a) null b) 1 c) FALSE d) TRUE
36. Byte codes are not specific to any one processor or any operating system.
a) TRUE b) FALSE c) Can’t say d) None of these
37. What is the characteristic of native code?
a) faster b) machine dependent c) machine independent d) Both (A) & (B)
38. Java source file should be created in ________ file.
a) Word processor b) Spread sheet c) Plain ASCII text editor d) Any of these
39. A name used to refer to the data stored in memory is called a ___________ .
a) Constant b) Variable c) Identifier d) Any of these
40. A variable name cannot begin with __________ .
a) Alphabet b) Underscore c) % d) $
41. _____________ code is faster to execute.
a) machine b) native c) panic d) gative
42. What is not available to Java?
a) main b) typedef c) bite code d) all of these
43. Which of the following is not an arithmetic operator?
a) * b) > c) / d) %
44. _____________ part of Java program is neither compiled nor interpreted.
a) body b) function c) comment d) procedure
45. what is written in the beginning of hexadecimal literals in java?
a) OH b) ox c) OX d) B or C
46. __________ Variables are defined within a class but outside any method.
a) Instance b) Local c) Class d) Global
47. Constructor has return types.
a) TRUE b) FALSE c) Can’t say d) None of these
48. How to execute the program in SciTE editor?
a) Tools -> Go b) Tools -> Run c) Option -> Go d) Option -> Run
49. How much size is occupied by the int data type?
a) 1 byte b) 2 byte c) 4 byte d) 8 byte
50. How many memory locations can be indicated at a time in a variable?
a) many b) 2 c) only one d) 8
51. What sign is used to declare multiple variables in java?
a) , b) ; c) : d) #
52. Traditionally for _____________ first character is given in upper case.
a) class b) variable c) camel case d) method
53. What is a literal?
a) One data type of b) name used to assign c) special word d) None of these
java language constant value
54. Which operator is used for logical AND?
a) && b) & c) ++ d) +
55. How many types of variables are there in java?
a) 2 b) 3 c) 4 d) 5
56. Which sign is used as an escape character in character literals?
a) / b) \ c) /* d) \*
57. Which of the following is entry-controlled loop?
a) for b) do _____ While c) both A and B d) None of these
58. Which of the following defines attributes and methods?
a) Class b) Object c) Instance d) Variable
59. Which of the following operator created an object and return its reference?
a) dot(.) b) new c) colon(:) d) assignment(=)
60. Which of the following method can be called without created an instance of a class?
a) Instance method b) Class method c) Constructor method d) All of these
61. Behavior is defined by ______________ in a class.
a) Method b) program c) A and B Both d) None of these
62. _________ keyword allots the memory to the object while creating the object.
a) Object b) new c) New d) A and B both
63. What is kept in heap?
a) Object b) Class Address c) Classes d) All of these
64. In the statement "r1 = new Room();", what does r1 hold?
a) object is stored in r1 b) variable r1 holds only c) holds the value of d) All of these
variable. the address of object room
65. Where is method created in Java?
a) in object b) in class c) in program d) not possible
66. Which is the syntax to access instance variable?
a) <object b) <object reference>. c) <instance variable> . d) <object reference> ,
reference>;<instanc <instance variable> <object reference> <instance variable>
e variable>
67. What is the Associativity of dot operator?
a) Left to right b) right to left c) A and B Both d) None of these
68. What is the meaning of polymorphism?
a) Many form b) More than one form c) A and B Both d) None of these
69. __________ is the special method which is invoked while creating an object.
a) Inheritance b) Constructors c) Public d) Mutator
70. __________ is called constructor without variables/arguments.
a) Inheritance b) Default Constructor c) Mutator method d) All of these
71. Access modifier is called "visibility modifier" because of __________ ,
a) access control is the b) access control can c) access control is not d) None of these
visibility control do modification visibility control
72. How many visibility levels are there to make method or variable secured?
a) 2 b) 3 c) 4 d) 5
73. What is used to invoke display() method within show() method of super class?
a) List.display() b) Super.display() c) Sub.display() d) Show.display()
74. Which access modifier provides the narrowest visibility?
a) package b) public c) private d) protected
75. Which of the following is a mutator method for variable length in java?
a) setlength() b) SetLength() c) getlength() d) getLength()
76. Which of the following is the concrete representation of an object?
a) method b) instance c) class d) variable
77. Accessor method is known as _____________ .
a) accessor b) setter c) getter d) mutator
78. _________ keyword is used to make a subclass in Java.
a) create b) extends c) prepare d) None of these
79. _________ class creates has -a type relationship.
a) Composition b) Aggregation c) A and B Both d) inheritance
80. What will be the value of mark[3] in int mark[ ]={90,60,70,80,9};
a) 70 b) 80 c) 9 d) 90
81. If we initialize the values of variables directly then _____________ operator is not needed.
a) new b) create c) array name d) All of these
82. String are enclosed with ___________ .
a) double quotes b) single quotes c) curly brackets d) square brackets
83. Which braces are used to initialize values to the elements of single dimensions array?
a) { } b) [ ] c) < > d) ( )
84. ___________ method converts all the characters of a string to the small letter characters.
a) LowerCase( ) b) String toLowerCase( c) String d) lowercase( )
) toLowerCase1[]
85. Which of the following syntax is not valid for declaring an array?
a) int marks[ ] = int[15]; b) int marks[ ] = new c) both A and B d) None of these
int[15];
86. What type of data can be presented using array in Java?
a) vector b) matrix c) multi-dimensional d) All of these
87. What will expression sales.length return for an array Sales[5][12]?
a) 5 b) 12 c) 60 d) 120
88. __________ package has the feature of using Calendar class.
a) java.lib.util b) java.util c) java.utilities d) java.libprpp
89. Using __________ method of Calendar class we can set the field constants.
a) Set b) get c) set d) Get
90. The array variable marks[5] has an index value from _________..
a) 1 to 5 b) 0 to 4 c) 0 to 5 d) 1 to 4
91. int marks[ ][ ]= new int [5][3]; the logical view of array elements is a table of _____________ .
a) 3 rows & 5 columns b) 15 columns c) 5 rows & 3 columns d) 15 rows
92. 1-D array of _________ can be considered as a string.
a) spaces b) groups c) characters d) columns
93. String() without arguments create a ___________ object with no character.
a) string b) Character c) buffer d) code
94. Java library also provides _________ class in Java.util package.
a) data b) string c) time d) date
95. Method getTime() returns __________data type
a) long b) string c) void d) date
96. Which method is used to set the value of the field constants of calendar class?
a) Get b) get c) Set d) set
97. How many bytes are ocupied by the characters in java?
a) 2 b) 4 c) 6 d) 8
98. Which value will be returned invoking string is equal to sir?
a) 0 b) 1 c) -1 d) None of these
99. Which brackets are used to refer subscript of an array?
a) [] b) () c) {} d) <>
100. In which form the 2-D array stores data?
a) row and column form b) tabular form c) both A and B d) None of these

You might also like