Compaq Placement Papers
Compaq JAVA Programming Questions and Answers
Compaq Technical Interview Questions with 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 Previous Years Technical Questions with Answers
Posted on :23-03-2016
Q1. What are the difference between java and C++?
Java adopts byte code whereas C++ does not C++ supports destructor whereas java does not support. Multiple inheritance possible in C++ but not in java.
Q2. What is static in java?
Static methods are implicitly final, their methods are not attached to an object rather it is attached to a class.
Q3. What is garbage collection?
When an object is no longer used, java implicitly recalls the memory of the object. Since java does not support destructor it makes use of garbage collector in the place of destructor.
Q4. What is overriding?
When any class use the same name, type and arguments as that of the methods in the super class then the class can override the super class method.
Q5. What are different types of access modifiers?
- public: accessible from anywhere.
- private: can be accessed only inside the class.
- protected: accessed by classes and subclasses of the same package.
- default modifier : accessed by classes contain the same package
Q6. What is a package?
Package is a collection interface and class which provides a very high level of protection and space management.
Q7. What is synchronization?
It is mechanism that allows only one thread to process the thread at a time. This is mainly to prevent deadlock.
Q8. What is the difference between Integer and int?
Integer defined in java. lang package which is a class, whereas int is a primitive data type defined in the Java language itself.
Q9. What is the difference between subclass and superclass?
Subclass does not inherit anything from other classes whereas superclass inherit from other class.
Q10. What is the method to implement thread?
Thread can be implemented by run() method
Q11. What is JVM?
JVM enables to convert the source code into the code which can be executed in the system. This makes the java independent of the platform
Q12. What is typecasting?
Typecasting converts entity of one type to entity of another type. It is very important while developing applications.
Casting is of two types:-
Q13. What is JVM and its use?
The most important feature of Java is platform independent, this is supported by JVM. It converts the machine code into bytes. It is the heart of the java language and a structure programming language.
Q14. Name four container classes?
Q15. What is serialization and deserialization?
It is process of representing the state of an object in byte stream. Process of restoring the object is done be deserialization.
Q16. What is JAR file?
JAR stands for java archive, it is used to compress a class of file.
Q17. If a variable is declared as private, where may the variable be accessed?
When the variable is declared private, it can be accessed only inside the class in which it is defined.
Q18. What is vector class?
Vector class provides the capability to implement array of objects.
Q19. What is the difference between swing and AWT?
AWT works faster than swing since AWT is heavy weight components.AWT consist of thin layer of code, swing is larger and of higher functionality.
Q20. What is tagged interface?
Tagged interface is similar to the serializable interface, it instruct the complier to perform some activity.
Q21. What is the difference between primitive scheduling and time slicing?
In case of primitive scheduling the task with highest priority is performed until it enters the dead state. In case of time slicing it performs the task for sometime and then enter the ready state.
Q22. What is referent?
Referent variable are constant variable it cannot be modified to refer to any other object then the one with it was initialized.
Q23. What is the resource Bundle class?
It is used to store the local specific resources inorder to tailor the appearance.
Q24. Is null a keyword?
NULL is not a keyword.
Q25. What is final?
A final class cannot be sub classed neither extended. The variables cannot change the value.