Revision Prog

A vibrant illustration representing Object-Oriented Programming concepts, such as classes, objects, inheritance, and polymorphism, with colorful coding elements and graphics.

Mastering Object-Oriented Programming

Test your knowledge in Object-Oriented Programming with this comprehensive quiz designed for programmers at all levels. With a focus on core OOP concepts, this quiz challenges your understanding of key principles and best practices.

Highlights of the quiz:

  • 30 carefully crafted questions
  • Immediate feedback on your answers
  • Enhance your programming skills
32 Questions8 MinutesCreated by CodingNinja1024
A constructor is
A method for object initialisation
A specific type of class
A dynamic binding of method call
A way to create an array
Inheritance is
A link between two classes
The extension of a type
The restriction of a type
A link between two objects
An instance variable is
A field
An unset data item
A static variable
An object
Which of these modifier does NOT exist
Protected
Public
Private
Final
When do you use OOP?
For small programms
When reuse is important
When the program is not subject to evolutions
To build web sites
What is a set?
An ordered collection
A linear collection that supports element insertion and removal at both ends
An object that maps keys to values
A collection that contains no duplicate elements
What is a process in Computer Engineering?
The instance of a computer program that is being executed
A series of actions or steps taken in order to achieve a particular end
A summons or writ requiring a person to appear in court
A series of mechanical or chemical operations on (something) in order to
What is a List?
An ordered collection
A linear collection that supports element insertion and removal at both ends
An object that maps keys to values
A collection that contains no duplicate elements
What is a Map?
An ordered collection
A linear collection that supports element insertion and removal at both ends
An object that maps keys to values
A collection that contains no duplicate elements
What is a Dequeue?
An ordered collection
A linear collection that supports element insertion and removal at both
An object that maps keys to values
A collection that contains no duplicate elements
What is a balanced tree?
A data structure with root data and leaf data
A data structure where the elements are kept ordered
A specific king of class
A class inheriting from Collection
What is a linked list?
An array of objects
A structure made by objects pointing to each other
A type of balanced tree
A type of map
In which case will you use a HashMap?
Rare access in reading
Frequent access in writing
Frequent need for sorting the values
Several values for a single key
In which case will you use a TreeMap?
Rare access in reading
Frequent access in writing
Frequent need for sorting the values
Several values for a single key
What makes the signature of a method unique?
The return type, the name, the parameters
The name, the parameters
The visibility, the return type
The visibility, the return type, the name
Which visibility should you use to enable to access to a given method to subclasses, but not everybody
Public
Protected
Default
Private
Which of these cannot be declared static?
Class
Object
Variable
Method
Which of these methods must be made static?
Main( )
Delete ( )
Run ( )
Finalize( )
What is the process of defining two or more methods within same class that have same name but different parameters declaration?
Method overloading
Method overriding
Method hiding
None of the mentioned
Which of these can be overloaded?
Methods
Constructors
All of the mentioned
None of the mentioned
Which of the following is a method having same name as that of it’s class?
Finalize
Delete
Constructor
Class
Which method can be defined only once in a program?
Main method
Finalize method
Static method
Private method
The Java language is
A virtual machine
A platform independent representation of a compiled class
An object-oriented language
A pre-defined set of libraries
What are the strength of procedural programming?
Control over memory
Scope (=variable visibility) enforcement
Efficient organization of modules
Good reusability
What are the strength of object programming?
Control over memory
Scope (=variable visibility) enforcement
Flexible organization of modules
Machine-level language
How is the creation of a new object called?
Instantiation
Compilation
Generation
Construction
Which operation does associate a variable name with its type?
Definition
Declaration
Creation
Instantiation
Which UML diagram can you use to specify the static view of a program?
Sequence diagram
Activity diagram
Class diagram
Communication diagram
A double is
An integer data type
A discrete data type
A continuous data type
A floating point data type
How do you create an array of strings in Java?
String[max] myText = new String[];
String[max] myText = new String[max];
String myText[max] = new String[max];
String[] myText = new String[max];
How do you compare two strings ‘String a=”Hello”; String b=”Girl”’ in Java?
If(a = b) {}
If(a.equals(b)) {}
If(a == b) {}
If(a equals b) {}
What is an exception in Java?
Error that the programs can generate themselves
Internal errors of the Java Virtual Machine
Resource exhaustion
Errors in user input
{"name":"Revision Prog", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge in Object-Oriented Programming with this comprehensive quiz designed for programmers at all levels. With a focus on core OOP concepts, this quiz challenges your understanding of key principles and best practices.Highlights of the quiz:30 carefully crafted questionsImmediate feedback on your answersEnhance your programming skills","img":"https:/images/course3.png"}
Powered by: Quiz Maker