Technical Interview Questions and Answers :: Societe Generale
Tot. Mock Test: 3
Total Qs: 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.
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)
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.
super is a keyword in java used to refer to the base class in inheritance
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.
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
No, java vannot run on 1MB RAM machine. The harware requirement is 128MB RAM.
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.
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.
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.
No Discussion on this question yet!