Hot Topics
NTT Data Solution
Technical Round
- Question 1
Explain function overloading and function overriding.
- Answer
Function overloading in Java is when we have multiple functions with same name but different parameters.
Function overriding happens when a child class has same function as parent class.
- Question 2
What are the OOPs concept?
- Answer
Important features of OOPs are
Inheritance: It is a concept of Object Oriented Programming in which a new class is created from the existing one.
Polymorphism: Poly means many and morph means form. A concept that enables programmers to assign a different meaning or usage to a variable, function or an object in different context.
Polymorphism can be of two types:
Runtime Polymorphism
Compile Time Polymorphism
Abstraction: Creating a new data type using encapsulated items that is well suited for an application.
Encapsulation: It is called data hiding and encapsulation is the way of packing data and function into a single unit to hide the implementation details of a class from outer world.
Method Overriding: In place of inheritance if the parent class and child class both have the same method signature then child class method overrides the parent class method.
Method Overloading: If a class has more than one method with the same method name with variety of parameter list then method will be overloaded.
Object: Object is the reality of a class.
Class: Class is a blue print of similar type of objects.
Constructor: Constructor is a special member function that is automatically invoked at the time of object creation and does not have any return type.
- Question 3
What are the features of C programming language?
- Answer
Features of C language are:
Simple and efficient
Fast as it is a compiled language
Robust library and functions to help beginners write code easily.
It checks the time to execute the program during the compilation and not during run time.
- Question 4
Explain Normalization.
- Answer
Normalization is process to analyse the given relational schemas based on their functional dependencies and primary key to minimize data redundancy and minimize insertion, deletion and update anomalies.
Types of normalization:
1NF
2NF
3NF
BCNF
4NF
5NF
- Question 5
What is DBMS?
- Answer
It is a collection of programs that enables users to create and maintain a database. In other words, it is a general purpose software that provides the user with the processes of defining, constructing and manipulating the database for various applications.
- Question 6
What is polymorphism? Explain with example
- Answer
Polymorphism is briefly described as “one interface, many implementation”. Polymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts specifically, to allow an entity such as a variable, a function, or an object to have more than one form. There are two types of polymorphism:
Compile time polymorphism
Run time polymorphisma
- Question 7
Difference between DROP and DELETE.
- Answer
DROP | DELETE |
1. It is a DDL command. | It is a DML command. |
2. Used when we want to delete the whole structure of the table. | Used when we want to delete rows from a table. |
3. Syntax: DROP from Table_name | Syntax: DELETE from Table_name |
- Question 8
What is garbage collection?
- Answer
Garbage collection is a process that keeps on running in the background which is used to free up the unused heap memory.
- Question 9
What is exception handling?
- Answer
Exception handling is a process to respond to the unwanted or unexpected occurrences.
- Question 10
What do you understand by runtime polymorphism?
- Answer
In Java runtime polymorphism is a process in which a call to an overridden method is resolved at runtime rather than at compile time. In this process, an overridden method is called through reference variable of a superclass.
- Question 11
What are android fundamental component?
- Answer
Android fundamental components are activities, views, intents, services, content providers, fragments and AndroidManifest.xml.
- Question 12
What is RDBMS?
- Answer
RDBMS stands for Relational Database Management System which is a program used to maintain a relational database.
- Question 13
What is “static” in Java?
- Answer
In Java “static” is a keyword.
- Question 14
What is “Collection Framework” in Java?
- Answer
The Collection Framework in Java is a group of classes and interfaces that provide a standard way of organizing and manipulating collections of objects. It provides a unified architecture for managing different types of collections, including lists, sets, and maps. The Collection Framework defines several general-purpose implementations (such as ArrayList, HashSet, and HashMap), as well as a number of algorithms for searching, sorting, and manipulating collections.
By using the Collection Framework, Java developers can write code that is both concise and efficient, without having to worry about the underlying details of how collections are implemented.
The Collection Framework is part of the Java Standard Library and is included with all Java installations. It is widely used in Java programming and is a fundamental aspect of the Java language and its ecosystem.
- Question 15
What is an abstract class in Java?
- Answer
Abstract class in Java is special kind of class which is declared with the abstract keyword which cannot be used to create objects. It can contain both abstract and non-abstract methods.
- Question 16
What is call by value and call by reference?
- Answer
Call By Value | Call By Reference |
1. When a copy of a value is passed to the function, then the original value is not modified. | When a copy of value is passed to the function, then the original value is modified. |
2. Actual arguments and formal arguments are created in separated memory locations. | Actual arguments and formal arguments are created is same memory location. |
3. In this case, actual argument remain safe as they cannot be modified. | In this case, actual arguments are not reliable, as they are modified. |
4. The copied of the actual arguments are passed to the formal arguments. | The address of actual arguments are passed to their respective formal arguments |
- Question 17
What is stack and queue?
- Answer
Stack is a linear data structure that is used to store and retrieve values in Last In First Out method which means all the insertion and the deletion operation will be from the same end.
It has five main operations:
Push: Insert elements on the top
Pop: Delete an element from the top
Peek: Fetch the value at the top without removing the element from the stack.
isEmpty: checks if stack is empty.
IsFull: checks if stack is full.
Queue is an abstract data structure, somewhat similar to stack. In contrast to stack, the queue is opened at both ends. One end is always used to insert data and the other end is used to remove data. It follows First In First Out methodology.
- Question 18
What is the difference between var and val?
- Answer
Var is mutable and val is immutable.
- Question 19
What are the different types of polymorphism in C++?
- Answer
In C++ we have two types of polymorphism:
Compile Time Polymorphism: It can be achieved by function overloading and operator overloading.
Run Time Polymorphism: It can achieved by function overriding.