Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

Compaq JAVA Programming Questions and Answers

Posted on :23-03-2016

Q1. What are the different scopes for java variables?

ANS:
The different scopes for java variables are as follows:-
  Local
  Instance
  Static


Q2. What is collection Views?

ANS:
Collection view is a method that is used  to view map as a collection. This can be done in three ways:-
  1. Values
  2. Keyset
  3. Entryset


Q3. What modifiers can be used with a local inner class?

ANS:
Some of the modifiers that can be used in the local inner class are as follows:-
  1. Final
  2. Abstract
  3. Static modifier


Q4. What is Layout Managers?

ANS:
  1. It is an object that implements Layout Manager  interface and also determines the position and size of the components within a container.
  2. Some of the task associated with layout manager are as follows:-
    Adding space between components
    Adding components to container
    Setting up layout manager


Q5. What is numeric promotion?

ANS:
Numeric promotion is a conversion of numeric type of smaller to a larger numeric type, so that integer and floating-point operations may take place. In numerical promotion, byte, char, and short values are converted to int values.

The int values are also converted to long values, if necessary. The long and float values are converted to double values, as required.


Q6. What is the Resource Bundle class?

ANS:
It contains locale specific objects. If a program requires locale specific resources then the program can load resource bundle that is appropriate for the current user.

      Advantage:-
     Make it localized, and can be translated into different languages.
     Modification can be done easily.


Q7. How does a try statement determine which catch clause should be used to handle an exception?

ANS:
When an exception is thrown within the body of a try statement, the catch clauses of the try statement are examined in the order in which they appear. The first catch clause that is capable of handling the exception is executed. The remaining catch clauses are ignored.                     


Q8. How many objects are created in the following piece of code?

ANS:
   MyClass c1, c2, c3;
   c1 = new MyClass ();
   c3 = new MyClass ();

c1 and c3 are the two objects created. The c2 is only declared and not initialized.


Q9. Can main method be declared final?

ANS:
The main method can be declared final with the addition of public static.


Q10. What is multimaps?

ANS:
Multimap is also like map which map key to multiple values. But there is no separate interface for multimap in Java since it is used quiet often. It is much more simple to use map whose values to list instance as a multimap.


Q11. Is abc a primitive value?

ANS:
Abc is a string object it is not primitive value.


Q12. Which arithmetic operations can result in the throwing of an Arithmetic Exception?

ANS:
Integer / and % can result in the throwing of an Arithmetic Exception.


Q13. Which package is always imported by default?

ANS:
Java.lang is the package that imported by default.


Q14. Is delete a keyword in Java?

ANS:
Delete is not a keyword in Java. Java does not make use of explicit destructors the way C++ does.


Q15. Is Empty .java file a valid source file?

ANS:
An empty java file is perfectly a valid java source file.


Q16. What will be the output of the following statement?

ANS:
   System.out.println (1 + 5);

   Output: 15.


Q17. What is a compilation unit?

ANS:
A compilation unit is composed of two parts: an interface and an implementation. The interface contains a sequence of specifications, just as the inside of a sig … end signature expression. The implementation contains a sequence of definitions, just as the inside of a struct … end module expression


Q18. What happens when you add a double value to a String?

ANS:
When double value is added to the string it becomes a string object.


Q19. Can an unreachable object become reachable again?

ANS:
An unreachable object becomes reachable if the objects finalize() method is invoked, the object performs operation that causes the object to accessible.


Q20. Is &&= a valid Java operator?

ANS:
no &= is a valid operator not &&=


Q21. What will be the default values of all the elements of an array defined as an instance variable?

ANS:
If the array is of primitive data type then the elements of the array is initialized to default value. If the array is of reference type then it is initialized to NULL.


Q22. What is the Map interface?

ANS:
Map is an object which helps to map the keys to values. It is not possible to have duplicate keys. It is essential that each key should map to a one value.
Three Map implementations are
  1. Hashmap
  2. LinkedHashmap
  3. Treemap


Q23. What is the Simple Time Zone class?

ANS:
It is a subclass of Time zone which represent time zone that could be used with Gregorian calendar. It does not handle any changes.


Q24. Does Java provide any constructor to find out the size of an object?

ANS:
There is no size of operator in java. It is not possible to determine the size of the object directly in java.


Q25. What is the default value of the local variables?

ANS:
When the local variables are not initialized explicitly the java compiler will not compile. And it will not initialize any default value for these local variable.


  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop