CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set C

CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set C with answers available in Pdf for free download. The MCQ Questions for Class 12 Computer Science with answers have been prepared as per the latest 2021 syllabus, NCERT books and examination pattern suggested in Standard 12 by CBSE, NCERT and KVS. Multiple Choice Questions for important part of exams for Grade 12 Computer Science and if practiced properly can help you to get higher marks. Refer to more Chapter wise MCQs for NCERT Class 12 Computer Science and also download more latest study material for all subjects

Question: Variable of class type are also referred to as________variables.

  • a) Orientation
  • b) Position
  • c) Reference
  • d) Indication

Answer: Reference


Question: Using________keyword, an object can be created.

  • a) Int
  • b) Float
  • c) New
  • d) Real

Answer: New


Question: Operator________allocates the memory for an object and returns the address of the object for later use.

  • a) Int
  • b) Float
  • c) New
  • d) Real

Answer: New


 

Question: _________is the address of the memory location where the object is stored.

 

  • a) Memory
  • b) Variable
  • c) Reference
  • d) None of these

Answer: Reference


Question: There is a special portion of memory called the______where the objects live.

  • a) Heap
  • b) Pile
  • c) Stack
  • d) All of these

Answer: Heap


Question: When an object is created, in addition to allocating memory, a special method called_______is executed to perform initial task.

  • a) Function
  • b) Constructor
  • c) Class
  • d) Method

Answer: Constructor


Question: An object can be created of type Room and assign its address to variable rl as_______

  • a) rl = new Room();
  • b) rl = Room() new;
  • c) rl = Class Room();
  • d) None of these

Answer: rl = new Room();


Question: With empty parentheses without arguments, a default______is called.

  • a) Function
  • b) Constructor
  • c) Class
  • d) Method

Answer: Constructor


Question: A______initializes the attributes (variables) of the object using default values.

  • a) Function
  • b) Constructor
  • c) Class
  • d) Method

Answer: Constructor


Question: The______can contain arguments that determine the initial values of variables.

  • a) Room
  • b) Brackets
  • c) Parentheses
  • d) Class

Answer: Parentheses


Question: Observe the following Room r2 = new RoomO : - Variable r2 contains a______or address of memory location where a new object is created.

  • a) Memory
  • b) Variable
  • c) Reference
  • d) None of these

Answer: Reference


Question: The class determines only the_______of the variables.

  • a) Types
  • b) Collection
  • c) Location
  • d) Set

Answer: Types


Question: The actual________is contained inside the individual objects and not in the class.

  • a) Information
  • b) Data
  • c) Collection
  • d) Variables

Answer: Data


Question: Every______has its own set of data.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Object

Answer: Object


Question: _______allocated different memory space to hold their data values.

  • a) Classes
  • b) Variables
  • c) Operators
  • d) Objects

Answer: Objects


Question: In Java, when______are no more needed, the memory is claimed back for reuse.

  • a) Classes
  • b) Variables
  • c) Operators
  • d) Objects

Answer: Objects


Question: Java has a garbage collector that looks for unused______and reclaims the memory that those objects are using.

  • a) Objects
  • b) Variables
  • c) Cells
  • d) Memory spaces

Answer: Objects


Question: In Java, there is no requirement to do any explicit freeing of______

  • a) Cells
  • b) Variables
  • c) Memory
  • d) Class

Answer: Memory


Question: In Object-oriented programming (OOP) languages, creating an object is also called______instantiation.

  • a) Class
  • b) Object
  • c) Inheritance
  • d) Polymorphism

Answer: Object


Question: An______for an object is created by allocating memory to store data for that object.

  • a) Instance
  • b) Example
  • c) Illustration
  • d) None of these

Answer: Instance


More Questions.......................................


Question: An object that belongs to a_____is said to be an instance of that class.

  • a) Cells
  • b) Variables
  • c) Memory
  • d) Class

Answer: Class


Question: An________of a class is another word for an actual object.

  • a) Instance
  • b) Example
  • c) Memory
  • d) None of these

Answer: Instance


Question: _______is an abstract representation of an object, whereas an instance is its concrete representation.

  • a) Cells
  • b) Variables
  • c) Memory
  • d) Class

Answer: Class


Question: The terms instance and object are often used interchangeably in______languages.

  • a) Programming
  • b) OOP
  • c) All
  • d) None of these

Answer: OOP


Question: Each______of a class can hold different values for its attributes in variables declared in a class.

  • a) Instance
  • b) Example
  • c) Illustration
  • d) None of these

Answer: Instance


Question: ______variables are created at the time of creating an object and stay throughout the life of the object.

  • a) Program
  • b) Instance
  • c) Inherited
  • d) Duplicate

Answer: Instance


Question: ______variables define the attributes of an object.

  • a) Program
  • b) Instance
  • c) Inherited
  • d) Duplicate

Answer: Instance


Question: The______defines the kind of attribute.

  • a) Program
  • b) Variables
  • c) Property
  • d) Class

Answer: Class


Question: Each_____stores its own value for that attributes.

  • a) Program
  • b) Instance
  • c) Inherited
  • d) Duplicate

Answer: Instance


Question: To define an object's behaviour_______are created.

  • a) Instances
  • b) Programs
  • c) Methods
  • d) Functions

Answer: Methods

 

Question: In Java_____can be defined inside a class only.

  • a) Instances
  • b) Programs
  • c) Methods
  • d) Functions

Answer: Methods


Question: The_______can be invoked using the objects to access or modify the instance variables.

  • a) Instances
  • b) Programs
  • c) Methods
  • d) Functions

Answer: Methods


Question: The____invoked using the objects are known as instance methods.

  • a) Instances
  • b) Programs
  • c) Methods
  • d) Functions

Answer: Methods


Question: ______methods are used to define behaviour of an object.

  • a) Program
  • b) Instance
  • c) Inherited
  • d) Duplicate

Answer: Instance


Question: Invoking a______is to ask the object to perform some task.

  • a) Instance
  • b) Program
  • c) Method
  • d) Function

Answer: Method


Question: Objects are created with the_____keyword.

  • a) new
  • b) New
  • c) NEW
  • d) nEW

Answer: new


Question: The______keyword returns a reference to an object that represents an instance of the class.

  • a) new
  • b) New
  • c) NEW
  • d) nEW

Answer: new


Question: All instances of class are allocated memory in data structure called_______

  • a) Pile
  • b) Heap
  • c) Mound
  • d) New

Answer: Heap


Question: Each object______has its own set of data.

  • a) Example
  • b) Instance
  • c) Function
  • d) Method

Answer: Instance


Question: Instance variables and instance methods are accessed via_______

  • a) Classes
  • b) Variables
  • c) Operators
  • d) Objects

Answer: Objects


Question: Objects can be referred by using_____operator.

  • a) Colon (:)
  • b) Underscore(_)
  • c) Dot (.)
  • d) Angle Bracket(<)

Answer: Dot (.)


Question: The_____is an operator.

  • a) Colon (:)
  • b) Underscore(_)
  • c) Dot (.)
  • d) Angle Bracket(<)

Answer: Dot (.)


Question: Associatively of______operator is from left to right.

  • a) Colon (:)
  • b) Underscore(_)
  • c) Dot (.)
  • d) Angle Bracket(<)

Answer: Dot (.)


Question: Protection of data is possible with the use of access______

  • a) Modifiers
  • b) Operators
  • c) Methods
  • d) None of these

Answer: Modifiers


Question: When the instance variables are referred within the methods of the same class, there is no need to use______operator.

  • a) Colon (:)
  • b) Underscore(_)
  • c) Dot (.)
  • d) Angle Bracket(<)

Answer: Dot (.)


Question: When the programmer declares an object_______object is not created.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Method

Answer: Class


Question: Reference variable does not refer to any object and its initial value is_____by default.

  • a) Zero
  • b) One
  • c) Null
  • d) Minus one

Answer: Null


Question: Use of null reference or null pointer is illegal and may raise an_______

  • a) Exception
  • b) Negative value
  • c) Reference value
  • d) None of these

Answer: Exception


Question: Referring instance variable or invoking method with null reference will give an______

  • a) Example
  • b) Error
  • c) Mistake
  • d) Inaccurate result

Answer: Error


Question: The following code is_______System.out.println(rl.length);

  • a) Legal
  • b) Illegal
  • c) Both (A) and (B)
  • d) None of these

Answer: Illegal


Question: When an object is created using new keyword, memory is allocated from_______area to store the value of its attributes.

  • a) Pile
  • b) Heap
  • c) Mound
  • d) New

Answer: Heap


Question: Every object has its own______variables occupying different space in memory.

  • a) Example
  • b) Instance
  • c) Function
  • d) Method

Answer: Instance


Question: To store the value, it requires only one______per class.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Method

Answer: Variable


Question: Variables can be declared within a class using_______keyword before data type.

  • a) Public
  • b) New
  • c) Static
  • d) PrintIn

Answer: Static


Question: variables are called class variables.

  • a) Public
  • b) New
  • c) Static
  • d) Private

Answer: Static


Question: Values of instance variables are stored in______(memory allocated for the object).

  • a) Memory
  • b) Instance
  • c) Property
  • d) Method

Answer: Instance


Question: Values of_____variables are stored in class itself.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Method

Answer: Class


Question: _______variables can be accessed without creating an instance of a class.

  • a) Public
  • b) New
  • c) Static
  • d) Private

Answer: Static


Question: Just like class variable, class_______can be defined using static keyword in front of the method definition.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Method

Answer: Method


Question: ________variables and class methods can be accessed outside the class.

  • a) Class
  • b) Variable
  • c) Operator
  • d) Method

Answer: Class

 

Question: If the requirement is there that private data has to be modified by others, then___methods have to be written.

  • a) Accessor
  • b) Mutator
  • c) Restricted
  • d) Prefixed

Answer: Mutator


Question: Conventionally, naming of accessor and mutator methods is to capitalize the first letter of variable name and then prepend the variable name with the prefixes______respectively.

  • a) Set and get
  • b) Get and setter
  • c) Getter and set
  • d) Get and set

Answer: Get and set


Question: methods are also known as "getter".

  • a) Accessor
  • b) Mutator
  • c) Restricted
  • d) Prefixed

Answer: Accessor


Question: ______methods are also known as "setter".

  • a) Accessor
  • b) Mutator
  • c) Restricted
  • d) Prefixed

Answer: Mutator


Question: _______methods should be used to allow other methods to read only the data value.

  • a) Get
  • b) Set
  • c) Getter
  • d) Setter

Answer: Getter


Question: _____methods should be used to allow other methods to modify the data value.

  • a) Get
  • b) Set
  • c) Getter
  • d) Setter

Answer: Setter


Question: Just like variables of primitive data types and available built-in data types, objects can also be passed as_______in a method.

  • a) Parameters
  • b) Limit
  • c) Protocols
  • d) None of these

Answer: Parameters


Question: ______of primitive types are passed by value.

  • a) Parameters
  • b) Limit
  • c) Protocols
  • d) None of these

Answer: Parameters


Question: The values of actual______are copied to formal parameters and then function is executed.

  • a) Parameters
  • b) Limit
  • c) Protocols
  • d) None of these

Answer: Parameters


Question: Object parameters are passed by_______

  • a) Memory value
  • b) Memory reference
  • c) Variable value
  • d) Reference

Answer: Reference


Question: An address (and not value) of the actual_______is copied to formal parameter.

  • a) Protocol
  • b) Parameter
  • c) Value
  • d) All of these

Answer: Parameter


Question: Object-oriented programming languages provide reusability feature using_______

  • a) Polymorphism
  • b) Parameters
  • c) Inheritance
  • d) All of these

Answer: Inheritance


Question: ______allows us to build new class with added capabilities by extending existing class.

  • a) Polymorphism
  • b) Parameters
  • c) Inheritance
  • d) All of these

Answer: Inheritance


Question: Inheritance models______relationship between two classes.

  • a) 'is-a'
  • b) 'its-a'
  • c) 'has-a'
  • d) 'is-at'

Answer: 'is-a'


Question: _____class is also referred to as super class or base class.

  • a) Child
  • b) Parent
  • c) Sub
  • d) None of these

Answer: Parent


Question: In the same way; child class is also referred to as_____derived class or extended class.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: Whenever two classes have_______relationship, inheritance is used.

  • a) 'is-a'
  • b) 'its-a'
  • c) 'has-a'
  • d) 'is-at'

Answer: 'is-a'


Question: A________inherits all instance variables and methods from super class and it may have its own added variables and methods.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: Constructors are not inherited in_______

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: ______inherits all methods of super class and it may have additional methods.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: A sub class is not a subset of______In fact, sub class usually contains more information and methods than its super class.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Super class


Question: When an object of_____is instantiated, memory is allocated for all its attributes including inherited ones.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: In Java, to create a sub class, keyword '_____' is used in the class definition.

  • a) Extends
  • b) Int
  • c) Float
  • d) Create

Answer: Extends


Question: If the visibility of instance variables of_______is changed to private, the variables are not directly accessible outside the class.

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Super class


Question: _______members are directly available only in the class in which they are defined and nowhere else.

  • a) Public
  • b) Private
  • c) Protected
  • d) Packaged

Answer: Private


Question: _______members are available as 'private' members in the inherited sub class.

  • a) Public
  • b) Private
  • c) Protected
  • d) Packaged

Answer: Protected


Question: Java does not support multiple_______

  • a) Polymorphism
  • b) Parameters
  • c) Inheritance
  • d) All of these

Answer: Inheritance


Question: A sub class can be derived from only one_______

  • a) Inherited Class
  • b) Parent Class
  • c) Sub Class
  • d) Super class

Answer: Sub Class


Question: Which of the following defines attributes and methods ?

  • a) Class
  • b) Object
  • c) Instance
  • d) Variable

Answer: Class


Question: Which of the following keyword is used to declare Class variables and class methods ?

  • a) Static
  • b) Private
  • c) Public
  • d) Package

Answer: Static

Tags: 

 


Click for more Computer Science Study Material
Cascading Style Sheets and JavaScript
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set A
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set B
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set C
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set D
Classes and Objects In Java
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set A
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set B
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set C
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set D
Creating HTML Forms Using KompoZer
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set A
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set B
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set C
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set D
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set E
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set F
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set G
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set H
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set I
Designing Simple Website Using Kompozer
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set A
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set B
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set C
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set D
Exception Handling In Java
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set A
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set B
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set C
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set D
File Handling
CBSE Class 12 Computer Science File Handling MCQs Set A
CBSE Class 12 Computer Science File Handling MCQs Set B
CBSE Class 12 Computer Science File Handling MCQs Set C
CBSE Class 12 Computer Science File Handling MCQs Set D
CBSE Class 12 Computer Science File Handling MCQs Set E
CBSE Class 12 Computer Science File Handling MCQs Set F
File System
CBSE Class 12 Computer Science File System MCQs Set A
CBSE Class 12 Computer Science File System MCQs Set B
CBSE Class 12 Computer Science File System MCQs Set C
CBSE Class 12 Computer Science File System MCQs Set D
CBSE Class 12 Computer Science File System MCQs Set E
CBSE Class 12 Computer Science File System MCQs Set F
Introduction To E Commerce
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set A
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set B
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set C
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set D
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set E
Introduction To M Commerce
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set A
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set B
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set C
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set D
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set E
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set F
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set G
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set H
Java Basics
CBSE Class 12 Computer Science Java Basics MCQs Set A
CBSE Class 12 Computer Science Java Basics MCQs Set B
CBSE Class 12 Computer Science Java Basics MCQs Set C
CBSE Class 12 Computer Science Java Basics MCQs Set D
CBSE Class 12 Computer Science Java Basics MCQs Set E
CBSE Class 12 Computer Science Java Basics MCQs Set F
CBSE Class 12 Computer Science Java Basics MCQs Set G
Object Oriented Concepts
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set A
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set B
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set C
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set D
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set E
Publishing Documents Using Latex
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set A
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set B
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set C
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set D
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set E
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set F
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set G
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set H

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

Moderation of Marks Class 11 and 12 Board Exams

The portal for moderation and finalization of results for Class-12 is being opened from 16.07.2021 to 22.07.2021. As Board has to declare the result latest by 31.07.2021, schools have been requested to follow the schedule strictly and complete the moderation within...

CBSE asks schools to load Class 12 Internal Assessment Marks

This has a reference to the letter no CBSE/COORD/2021 dated 11.02.2021 regarding conduct of the School-Based Assessment (Internal Assessment/Practical/ Project) of Class-XII and uploading the marks by 11.06.2021. It has been observed that some schools have not been...

CBSE Class 12 Evaluation Criteria 2021

SUMMARY OF THE POLICY FOR TABULATION OF MARKS FOR CLASS XII BOARD EXAMINATIONS 2021   1(a) Due to cancellation of the Board examinations, the assessment of theory portion of 80/70/60/50/30 marks will be done by the school based on the following:     Class...

FAQs on Policy for Tabulation of Marks for Class 10 Board Exams

ON POLICY Question.1 How CBSE will declare the result of Class-X? Answer. Results of Class X Board will be declared on the basis of an objective criterion developed by the Board vide Notification no.CBSE/CE/2021 dated 01.05.2021. Question.2. If any candidate is not...

CBSE Board Examination Scheme of Assessment 2021 2022

A. Academic session to be divided into 2 Terms with approximately 50% syllabus in each term: The syllabus for the Academic session 2021-22 will be divided into 2 terms by following a systematic approach by looking into the interconnectivity of concepts and topics by...

×
Studies Today