Compaq Placement Papers
Compaq Previous Years Technical Questions with Answers
Compaq JAVA Programming Questions and Answers
Compaq Technical Test Questions 2014
Compaq Technical Interview Questions
Placement Papers for All Companies
Amiti Software Technologies
Ashok Leyland Ltd
AT & T
AXA Technology Services
Bharti Airtel Ltd
Blue Star Infotech
Citicorp Overseas Software Ltd
CtrlS Datacenters Ltd
Ernst & Young
Harita - TVS
HTC Global Services
IBS Software Services
IndiaBulls Power Limited
Jindal Steel and Power Limited
L & T
L & T Infotech
Linde India Ltd
Lucas - TVS
Mahindra Engineering Services Ltd
Poornam Info Vision
PSI Data Systems Limited
SAP labs India
Sutherland Global Services
UTC Aerospace System
Compaq Technical Interview Questions with Answers
Posted on :23-03-2016
Q1. What is Data Encapsulation?
Data encapsulation or data hiding is a function that keeps the implementation details hidden to the user. The user of the application is allowed to perform only limited task with the class members that are hidden.
Q2. What are the different types of inner classes?
* Member classes.
* Anonymous classes.
* Nested top-level classes.
* Local classes.
Q3. What is the difference between instanceof() and isInstance()?
- instanceof() is used to see whether the object can be typecast without making use of the exception.
- isInstance() is to check whether the specified object is compatible with the class that represent the object.
Q4. What is RMI?
RMI stands for remote method invocation; it enables the developer to create application based on java, in which the java objects are invoked by java virtual machines.
Q5. What is a class?
- A class represents a collection of attributes and behaviors of object. It is the class from which individual objects created.
- For example:-
Bicycle is a class that contain the following attributes
Q6. What are the advantages of OOAD?
* Increase the performance of the system.
* Increase the performance of the system.
Q7. What is an object?
An object is an entity, which consist of attributes, behaviors and qualities that describe the object.
Q8. What is OOAD?
OOAD stands for Object Oriented analysis and design. It is a methodology use to analyze, design and develop applications. It visualizes the class and the objects.
Q9. What is Data Abstraction?
It is a process of listing the essential features, without implementation details. Data abstraction is nothing but the extraction of the information which is required and ignoring the other information.
Q10. Why is java not 100% pure OOPS language?
Java does not support 100% pure OOPS concept, since it support primitive data type like int, long, byte etc, these are not objects.
Q11. What are the disadvantages of threads?
- The main disadvantage of using thread is that it is operating system dependent. It require to follow CPU cycle that various from system to system.
- Deadlock occurs.
Q12. What is serialization?
It is a method which saves the object state by converting to byte stream.
Q13. What are the different ways to handle exception?
* By placing the desired code in the try block and allow the catch block to catch the exception.
* Desired exception can be placed in throw clause.
Q14. What are java beans?
Java bean is a platform independent and portable. It helps to develop code that is possible to run in any environment
Q15. What are wrapper classes?
Wrapper class represents a base class for the data source. It allows the primitive data type to be accessed as objects.
Q16. What is the difference between == and equals methods?
- == is used to check whether two numbers are equal
- Equals is used to check whether two strings are equal.
Q17. What is the difference between data abstraction and information hiding?
Abstraction mainly focus on the outside view of the object whereas encapsulation prevents the user from seeing the inside view where the properties and behavior of the abstraction is implemented.
Q18. What is early binding?
Early binding or static type or static binding is assigning the value of the variable during design phase. Early binding instruct the compiler to allocate space and perform other task before the application starts executing.
Q19. What is singleton class?
A class which can create a single object at a time is called class. The object is accessible by the java virtual machine. It creates a single instance for the class
Q20. What is externalizable interface?
Externalizable interface controls the serialization mechanism. It consist of two methods readexternal and writeexternal. It helps to customize the serialization process.
Q21. Objects are passed by value or by reference?
In java objects are passed by value. Since, the object reference value is passed both the original and the copied parameter will refer to the same object.
Q22. How can you achieve multiple inheritance in java?
Multiple inheritance in java implemented in similar to the C++ with one difference the inherited interface should be abstract.
Q23. Is it necessary that each try block must be followed by a catch block?
It is not essential that try block should be followed by catch block.
Q24. Why is java case sensitive?
Java is platform independent language. It is widely used for developing code which contains different variables and hence java is case sensitive.
Q25. What are the qualities for a program to be 100% OOPS language?
- All predifined types are object
- Operations performed through messages to objects
- datatypes are to be objects.