Technical Interview Questions and Answers :: Wipro
Tot. Mock Test: 24
Total Qs: 86+
- Static binding happens at compile-time while dynamic binding happens at runtime.
- Binding of private, static and final methods always happen at compile time since these methods cannot be overridden. Binding of overridden methods happens at runtime.
- Java uses static binding for overloaded methods and dynamic binding for overridden methods.
it's optinal because last case is defaut statement no need the default statement neceesary.
1. C can run most of the code of C, but C can't run C code.
2. C supports procedural programming paradigm whereas C supports both procedural and object oriented programming paradigm.
3. C is a function driven and C is an object driven language.
4. C doesn't allow function definitions within structures whereas in C function definition can be within structures.
5. C doesn't support reference variables but C does support.
1. C supports pointers, Java doesn't.
2. Multiple inheritence is supported in C but not in Java.
3. Java has built-in support for threads whereas C doesn't have built-in support for threads.
4. No destructors in Java but C has them.
5. C supports both method and operator overloading, Java only supports method overloading.
5. Classes and Object
1) Encapsulation: It is the mechanism that binds together code and data in manipulates, and keeps both safe from outside interference and misuse. In short it isolates a particular code and data from all other codes and data. A well-defined interface controls the access to that particular code and data.
2) Inheritance: It is the process by which one object acquires the properties of another object. This supports the hierarchical classification. Without the use of hierarchies, each object would need to define all its characteristics explicitly. However, by use of inheritance, an object need only define those qualities that make it unique within its class. It can inherit its general attributes from its parent. A new sub-class inherits all of the attributes of all of its ancestors.
3) Polymorphism: It is a feature that allows one interface to be used for general class of actions. The specific action is determined by the exact nature of the situation. In general polymorphism means "one interface, multiple methods"; this means that it is possible to design a generic interface to a group of related activities. This helps reduce complexity by allowing the same interface to be used to specify a general class of action. It is the compiler's job to select the specific action (that is, method) as it applies to each situation.
Static Binding: The binding which can be resolved at compile time by the compiler is known as static or early binding. All the static, private and final methods have always been bonded at compile-time.
Dynamic Binding: When the compiler is not able to resolve the call/binding at compile time, such binding is known as Dynamic or late Binding. Overriding is a perfect example of dynamic binding as in overriding both parent and child classes have the same method. Thus while calling the overridden method, the compiler gets confused between parent and child class method(since both the methods have same name).
The difference between static and dynamic binding in Java.
It is a process of analyzing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
> Minimizing redundancy
> Minimizing insertion, deletion and update anomalies.
No Discussion on this question yet!
Pointer is a variable which are stored in the address of the another variable