Wipro – Java Interview Questions
Here is the list Java Interview Questions which are recently asked in Wipro company. These questions are included for both Freshers and Experienced professionals.
1. What is an Exception?
An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. Java defines several types of exceptions that relate to its various class libraries. Java also allows users to define their own exceptions.
2. Explain Runtime Exceptions?
RuntimeException is the superclass of all classes that exceptions are thrown during the normal operation of the Java Virtual Machine. The InvalidArgumentException is an exception raised when an invalid parameter is passed to a certain method on the server's referenced connection.
3. Define Inheritance?
Inheritance in Java is a concept that acquires the properties from one class to other classes; for example, the relationship between father and son. In Java, a class can inherit attributes and methods from another class. The class that inherits the properties is known as the sub-class or the child class.
4. What is Polymorphism?
Polymorphism allows to perform the same action in many different ways.It occurs when there are one or more classes or objects related to each other by inheritance. It has two types: Compile time polymorphism (static binding) and Runtime polymorphism (dynamic binding).
5. What is Abstraction?
Abstraction is a way to segregate implementation from an interface and one of the five fundamentals of objects oriented programming. An interface or abstract class is something that is not concrete, something which is incomplete.
6. What is the primary benefit of Encapsulation?
The main benefit of encapsulation is the ability to modify our implemented code without breaking the code of others who use our code. With this Encapsulation gives maintainability, flexibility and extensibility to our code.
7. What is an Interface?
An interface is an abstract type similar to protocols that is used to specify a behavior that classes must implement. A class that implements an interface must implement all of the non-default methods described in the interface, or be an abstract class.
8. What do you mean by Multithreaded program?
Multithreading is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU. Each part of such program is called a thread. So, threads are light-weight processes within a process.
9. How Java enabled High Performance?
Java is generally faster and more efficient than Python because it is a compiled language. It uses Just-In-Time compiler to enable high performance. Just-In-Time compiler is a program that turns Java bytecode, which is a program that contains instructions that must be interpreted into instructions that can be sent directly to the processor.
10. Why Java is considered dynamic?
Java is considered dynamic because of Bytecode. The source code which is written in one platform that code can be executed in any platform. It loads the class file during runtime only. Hence, anything that happens in runtime is dynamic.
11. List two Java IDE’s?
12. Define class?
A class is a blueprint that defines the variables and the methods common to all objects of a certain kind. It describes the contents of the objects that belong to it that is an aggregate of data fields and defines the operations.
13. What is a Local Variable?
A local variable in Java is a variable that's declared within the body of a method. It can use the variable only within that method. Other methods in the class aren't even aware that the variable exists
14. What is a Instance Variable?
As instance variables are declared in a class, these variables are created when an object of the class is created and destroyed when the object is destroyed. Unlike local variables, we may use access specifiers for instance variables.
15. Define Packages in Java?
Package in Java is a mechanism to encapsulate a group of classes, sub packages and interfaces. Packages are used for preventing naming conflicts.It is a namespace that organizes a set of related classes and interfaces.
TOP MNC's JAVA INTERVIEW QUESTIONS & ANSWERS
Here we listed all Java Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Java.