Technical Interview Questions and Answers :: Sopra Steria
- Select All
- SQL
- Java
- C++
- Informatica
- C
- DBMS
- Data Structure
- HR Question in TR
81 / 138
No Discussion on this question yet!
82 / 138
No Discussion on this question yet!
83 / 138
No Discussion on this question yet!
84 / 138
No Discussion on this question yet!
85 / 138
No Discussion on this question yet!
86 / 138
When an object is sent a message then it does not know itself what type it is, the runtime environment will decide about function calling over an object. This feature of connecting an object with its associated message at runtime is known as Polymorphism or Late binding or Dynamic binding.
87 / 138
Method Overloading:
A method with changed formal parameters will lead to implementing method overloading.
int calculateSum(int i,int j)
float calculateSum(float i,int j)
double calculateSum(double i,int j)
float calculateSum(int i,float j)
Method Overriding:
The method with the same signature but with changed implementation lead to method overriding and that can occur in a parent child relation of classes. A method defined in parent class can be overridden in its child class with different implementation from its base class.
1. Pointers are supported in C++ while not in Java. The memory management is done automatically with help of part of JVM called Garbage Collector.
2. Multiple inheritance is not supported in Java but supported in C++.
3. There are no structures and unions in Java.
4. There is no scope resolution operator in Java (::).
5. There are no destructors in Java like C++.
6. There is no virtual keyword in Java because all non-static method use dynamic binding.
88 / 138
super is a keyword in java used to refer to the base class in inheritance
89 / 138
No, an interface can't be instantiated. Interface is similar to class. Interface can only have abstract methods. A class can implement an interface.
90 / 138
A virtual function, equated to zero is called a pure virtual function. It is a function declared in a base class that has no definition relative to the base class. A class containing such pure function is called an abstract class.
It objectives are
• Provide some traits to the derived classes.
• To create a base pointer required for achieving run time polymorphism.