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

CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set D 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: Which of the following operator creates an object and returns its reference ?

  • a) Dot (.)
  • b) New
  • c) Colon (:)
  • d) Assignment (=)

Answer: New


Question: Which of the following method can be called without creating an instance of a class ?

  • a) Instance method
  • b) Class method
  • c) Constructor method
  • d) All of the above

Answer: Class method


Question: Which of the following refers more than one method having same name but different parameters ?

  • a) Overloaded methods
  • b) Overridden methods
  • c) Duplicate methods
  • d) All of the above

Answer: Overloaded methods


Question: Which method is invoked automatically with creation of an object ?

  • a) Instance method
  • b) Constructor
  • c) Class method
  • d) All of the above

Answer: Constructor


Question: Which of the following is the keyword used to refer a superclass constructor in sub class constructor ?

  • a) Extends
  • b) Super
  • c) Name of the superclass
  • d) New

Answer: Extends


Question: Which of the following is used to invoke an instance method in Java ?

  • a) The name of the object, colon(:) and the name of the method
  • b) The name of the object, dot(.) and the name of the method
  • c) The name of the class, colon(:) and the name of the method
  • d) The name of the class, dot(.) and the name of the method

Answer: The name of the object, dot(.) and the name of the method


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


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

 

Question: ________methods are global to the class itself and available to any other classes or objects.

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

Answer: Class


Question: Class methods can be used anywhere regardless of whether an_______of the class exists or not.

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

Answer: Instance


Question: The methods that operate on a particular object, or affect that object, should be defined as_____methods.

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

Answer: Instance


Question: _______that provide some general utility but do not directly affect an instance of the class are better declared as class methods.

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

Answer: Methods


Question: The designers of Java have already provided a large number of______classes with such class methods.

  • a) Programmed
  • b) Internal
  • c) Built-in
  • d) Built-out

Answer: Built-in


Question: The______definitions in the source code specify the things that are part of the class itself.

  • a) Public
  • b) Non-static
  • c) Static
  • d) Private

Answer: Static


Question: The______definitions in the source code specify the things that will become part of every instance object belonging to a class.

  • a) Public
  • b) Non-static
  • c) Static
  • d) Private

Answer: Non-static


Question: Class variables and class methods can be accessed using a class name or_____variable.

  • a) Reference
  • b) Instance
  • c) New
  • d) Private

Answer: Reference


Question: Class variables and class methods can be accessed from_____methods also.

  • a) Reference
  • b) Instance
  • c) New
  • d) Private

Answer: Instance


Question: Instance variables and______methods can't be accessed from class methods, as class methods do not belong to any object.

  • a) Reference
  • b) Instance
  • c) New
  • d) Private

Answer: Instance


Question: Variables defined inside methods or blocks are called_____variables.

  • a) Public
  • b) Global
  • c) Private
  • d) Local

Answer: Local


Question: Formal parameters of the methods are also______variables.

  • a) Public
  • b) Global
  • c) Private
  • d) Local

Answer: Local


Question: _______variables are not initialized by default values.

  • a) Public
  • b) Global
  • c) Private
  • d) Local

Answer: Local


Question: ________variables are variables defined within a class but outside any method.

  • a) Instance
  • b) Private
  • c) Local
  • d) Global

Answer: Instance


Question: ________variables are allocated memory from heap area when an object is instantiated (created).

  • a) Class
  • b) Instance
  • c) Local
  • d) Global

Answer: Instance


Question: _______variables are initialized by default values.

  • a) Class
  • b) Instance
  • c) Local
  • d) Global

Answer: Instance


Question: _______variables are variables defined within a class, outside any method, with the static keyword.

  • a) Class
  • b) Instance
  • c) Local
  • d) Global

Answer: Class


Question: _______variables are allocated memory only once per class and is shared by all its objects.

  • a) Class
  • b) Instance
  • c) Local
  • d) Global

Answer: Class


Question: ______variables are initialized with default values.

  • a) Class
  • b) Instance
  • c) Local
  • d) Global

Answer: Class


Question: _____requires the use of constructors.

  • a) Declaration
  • b) Instantiation
  • c) Initialization
  • d) Inheritance

Answer: Initialization


Question: The word________means "many forms"; different forms of methods with same name. \

  • a) Declaration
  • b) Instantiation
  • c) Polymorphism
  • d) Inheritance

Answer: Polymorphism


Question: In Java, there can be different methods that have the same name but different_________

  • a) Variables
  • b) Declarations
  • c) Programs
  • d) Signature

Answer: Signature


Question: The above feature of Java is called________

  • a) Method Overloading
  • b) Method Offloading
  • c) Variable Overloading
  • d) Program Overloading

Answer: Method Overloading


Question: The methods______is a combination of the method name, the type of return value (object or base type), a list of parameters.

  • a) Variables
  • b) Declarations
  • c) Programs
  • d) Signature

Answer: Signature


Question: The example given below is an example of : static int max(int x, int y) {...} static int max(int x, int y, int z) {...} static double max(double x, double y, double z)

  • a) Method Overloading
  • b) Method Offloading
  • c) Variable Overloading
  • d) Program Overloading

Answer: Method Overloading


Question: _______is a special kind of method that is invoked when a new object is created.

  • a) Destructor
  • b) Constructor
  • c) Invoker
  • d) Creator

Answer: Constructor


Question: can perform any action; but it is mainly designed to perform initializing actions.

  • a) Destructor
  • b) Constructor
  • c) Invoker
  • d) Creator

Answer: Constructor


Question: Every class is having its default constructor; sometimes referred to as no-argument________

  • a) Destructor
  • b) Constructor
  • c) Invoker
  • d) Creator

Answer: Constructor


Question: Default_____does not take any argument.

  • a) Destructor
  • b) Invoker
  • c) Constructor
  • d) Creator

Answer: Constructor


Question: ________initializes the attributes of a newly created object using default values based on their data types.

  • a) Destructor
  • b) Invoker
  • c) Constructor
  • d) Creator

Answer: Constructor

 

Question: Constructor must have the same______as class name.

  • a) Name
  • b) Style
  • c) Format
  • d) Arrangement

Answer: Name


Question: Constructor user not have______type.

  • a) Data
  • b) Return
  • c) Operator
  • d) All of these

Answer: Return


Question: Constructor is invoked implicitly only when an object is constructed using______operator.

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

Answer: new


Question: ______cannot be invoked explicitly elsewhere in the program.

  • a) Destructor
  • b) Invoker
  • c) Constructor
  • d) Creator

Answer: Constructor


Question: Like other methods, constructor can also be overloaded.

  • a) Destructor
  • b) Invoker
  • c) Constructor
  • d) Creator

Answer: Constructor


Question: In absence of______constructors in a class, objects are constructed using default no-arument constructor.

  • a) Denned
  • b) User-defined
  • c) Built in
  • d) Ready-made

Answer: User-defined


Question: A no-argument______initializes the attributes using default values.

  • a) Destructor
  • b) Invoker
  • c) Constructor
  • d) Creator

Answer: Constructor


Question: The syntax of a no-argument constructor is_______

  • a)
  • b){ };
  • c)( ) { }
  • d)( ) { };

Answer: ( ) { };


Question: _______control is about controlling visibility.

  • a) Access
  • b) Modifier
  • c) Visibility
  • d) Entrance

Answer: Access


Question: _______modifiers are also known as visibility modifiers.

  • a) Access
  • b) Modifier
  • c) Visibility
  • d) Entrance

Answer: Access


Question: If a method or variable is visible to another class, then only it can be referred in another_______

  • a) Class
  • b) Method
  • c) Program
  • d) Application

Answer: Class


Question: The Four P's of protection are

  • a) Public
  • b) Package (default protection)
  • c) Protected and Private
  • d) All of these

Answer: All of these


Question: ________modifiers public, protected and private are used before the type of variable or method.

  • a) Access
  • b) Modifier
  • c) Visibility
  • d) Entrance

Answer: Access


Question: ________is used to organize classes.

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

Answer: Package


Question: _______statement should be added as the first non-comment or non-blank line in the source file.

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

Answer: Package


Question: When a file does not have package statement, the classes defined in the file are placed in_______package.

  • a) Public
  • b) File
  • c) Default
  • d) Private

Answer: Default


Question: Package statement has_______syntax.

  • a) Package < packageName>;
  • b) Package < packageName>
  • c) Package < Name>;
  • d) Package packageName;

Answer: Package < packageName>;


Question: Any_______or variable is visible to the class in which it is defined.

  • a) Data type
  • b) Method
  • c) File
  • d) Information

Answer: Method


Question: To provide_______access, use access modifier public before type of variable or method.

  • a) Public
  • b) File
  • c) Default
  • d) Private

Answer: Public


Question: ________keyword has been used with main() method to make it available to everyone.

  • a) Public
  • b) File
  • c) Default
  • d) Private

Answer: Public


Question: ________keyword is used to allow the access only to sub classes or to share with the methods declared as "friend".

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

Answer: Protected


Question: Use of______protection becomes more relevant when inheritance concept is used in object-oriented programming.

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

Answer: Protected


Question: Highest level of protection can be achieved by using "_______" protection level.

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

Answer: Private


Question: _______provides the narrowest visibility.

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

Answer: Private


Question: The________methods and variables are directly accessible only by the methods defined within a class.

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

Answer: Private


Question: ______methods may seem extremely restrictive, but it is, in fact, a commonly used level of protection.

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

Answer: Private


Question: Private provides_____encapsulation; hiding data from the world's sight and limiting its manipulation.

  • a) Information
  • b) Variable
  • c) Data
  • d) Data type

Answer: Data


Question: Anything that shouldn't be directly shared with anyone including its sub class is_______

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

Answer: Private


Question: When access to data is restricted by declaring them as________the purpose is to protect them from getting directly accessed or modified by methods of other class.

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

Answer: Private


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

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

Answer: Accessor

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...

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...

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...

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...

×
Studies Today