Technical Interview Questions and Answers :: Societe Generale
- Select All
- Oracle PLSQL
- SQL
- Java
- C++
- Informatica
- WebMethod
- DBMS
- C
- Soft. Engineering
- Data Structure
- HR Question in TR
41 / 75
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.
42 / 75
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.
43 / 75
super is a keyword in java used to refer to the base class in inheritance
44 / 75
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.
45 / 75
Singleton class is a design pattern where it allowes creating only one object per class
we should define constructor as private it object creation is restricted
we should use static method this method is returen object of same class only
46 / 75
No, java vannot run on 1MB RAM machine. The harware requirement is 128MB RAM.
47 / 75
Java Virtual Machine(JVM) is what makes Java platform independent. A compiled java code creates a .class file which can then be run on any platform which has JVM installed on it.
48 / 75
A collection is an object that can hold references to other objects. The collection interfaces declare the operations that can be performed on each type ofcollection. The classes and interfaces of thecollections framework are in package java.util.
49 / 75
An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally.
50 / 75
there are two classes.
outer class
inner class