Java - Interview Questions and Answers for 'Dws' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2137 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Dws' - 12 question(s) found - Order By Newest

Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. Frequently asked in HCL Technologies.
  Q1. What is the difference between final, finally and finalize() ?Core Java
Admin
info@buggybread.com
Ans. final - constant variable, objects cannot be de-referenced, restricting method overriding, restricting class sub classing.

finally - handles exception. The finally block is optional and provides a mechanism to clean up regardless of what happens within the try block. Use the finally block to close files or to release other system resources like database connections, statements etc.

finalize() - method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state.

  Sample Code for final

  Sample Code for finally

  Sample Code for finalize

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   oops   final   finally   finalize     Thomson Reuters  WITS  Antra  Jive  MorningStar  VanGuard   Alcatel Lucent  Morningstar  A9.com  EPAM  Nuance  SirsiDynix  NCR  VanGuard  Proofpoint Interview  Disney  Orbitz Worldwide  GFI Informatique  Canon  WITS  Simba Technologies  Marlabs  American Well  Global Relay  L&T Infotech  HCL Technologies  Tata Consultancy (TCS)  Wipro  Infosys  Accenture  Jive  Salesforce  Deegit  NTT DATA  Proofpoint  Morningstar  Bank Of America  Manhattan Associates  Optum  NorthPoint  Nok Nok Labs  Simba Technologies   Rhino Africa  Solutionreach  V Soft Consulting  EBay  Cognizant (CTS)  IBM  ExactTargetKewill  CV Holdings  Symphony  Cubic Web solutions  Star International  FatWire  Mindteck      basic        frequent

Try 4 Question(s) Test


  Q2. Difference between Vector and ArrayList ?Core Java
Anonymous
Ans. Vectors are synchronized whereas Array lists are not.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   basic interview question   vector   arraylist   collections   synchronization     Oracle  Lab49  Infosys  Wipro  Zoho  HCL Technologies  Tata Consultancy (CTS)  BirlaSoft  Emory  Xplana  British Telecom (BT)  Apex Systems  Capgemini  Accenture  3dplm Software Solution  AppKnox  eIntern  Landmark Information Group  ESystems  Orbitz Worldwide  HARMAN  Starmount  iConsultus  KARYA Technologies  Smart Chip  Cuelogic Technologies  Kronos  Trigent Software  Deloitte  ACI Worldwide  Unisys  Tavant Technologies  Referance data      basic        frequent


Almost sure to be asked in every company using any Dependency Injection framework ( Spring, Guice etc )
  Q3. What is Dependency Injection or IOC ( Inversion of Control ) ?Design

Ans. It is a Design Pattern that facilitates loose coupling by sending the dependency information ( object references of dependent object ) while building the state of the object. Objects are designed in a manner where they receive instances of the objects from other pieces of code, instead of constructing them internally and hence provide better flexibility.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     design patterns   ioc ( Inversion of Control )  dependency injection     Nucleus Software Exports  HCL Technologies  Tata Consultancy (TCS)  HCL  Infosys  Cognizant (CTS)  Barclays  General Electric  Infosys Technologies  Elsevier  Sabre  ZapCom  Nike  Sogeti  CSG International  Lowes  DWS  Mitsui Bussan Logistics  Payment Processing Partners  Liquidnet  AmTrust Financial  VectorForm  Cybage  Vanderbilt University  Cigniti  Accenture  Ball Aerospace  GE Healthcare  1-800 Contacts  VinSolutions  Arrow Electronics  Monitise  Avenue Code  Thetus Corporation  Shodogg  Levi9  BuildLinks  Suyati Technologies  Kanerika Software  Alliance Inspection Management  Promega  Victorious  Zoll Data Systems  Parkmobile  PerceptiMed  Crate and Barrel  Carbonite  Concur  Codazen  GlobalLogic  AccuSoft  Attinad  Tillster  AppRiver  TrustPilot  Pearson  Kony  Art Technology Group  VeriSign  Accion Labs  IGS Energy  National Bankruptcy Services  RealPage  Green Dot  Indecomm Global  bebo Technologies  Open Solutions  Xoriant  NCR  Macmillan Cancer Support  NetSuite  Asynchrony Labs  DealDash  Vizio  Fiserv  Federal Reserve Bank of Minneapolis  Tinder  FICO  Trustwave      intermediate        frequent


 Q4. Tell something about BufferedWriter ? What are flush() and close() used for ?
Admin
info@buggybread.com
Ans. A Buffer is a temporary storage area for data. The BufferedWriter class is an output stream.It is an abstract class that creates a buffered character-output stream.Flush() is used to clear all the data characters stored in the buffer and clear the buffer.Close() is used to closes the character output stream.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   java io   input output   file handling   file io   output stream   bufferedwriter   flush   close


 Q5. Which of the following code is correct ?

a.


FileWriter fileWriter = new FileWriter("../file.txt");
File file = new File(fileWriter );
BufferedWriter bufferedOutputWriter = new BufferedWriter(fileWriter);

b.

BufferedWriter bufferedOutputWriter = new BufferedWriter("../file.txt");
File file = new File(bufferedOutputWriter );
FileWriter fileWriter = new FileWriter(file);


c.

File file = new File("../file.txt");
FileWriter fileWriter = new FileWriter(file);
BufferedWriter bufferedOutputWriter = new BufferedWriter(fileWriter);

d.

File file = new File("../file.txt");
BufferedWriter bufferedOutputWriter = new BufferedWriter(file);
FileWriter fileWriter = new FileWriter(bufferedOutputWriter );
Core Java
Admin
info@buggybread.com
Ans. c.

File file = new File("../file.txt");
FileWriter fileWriter = new FileWriter(file);
BufferedWriter bufferedOutputWriter = new BufferedWriter(fileWriter);

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   io   file   fileio   coding   code   filewriter   bufferedwriter   scjp   ocjp  file handling


 Q6. Difference between Stack and Heap memory ?Core Java
Admin
info@buggybread.com
Ans. Stack memory areas is used to hold method and local variables while objects are always allocated memory in the heap. The heap memory is shared between multiple threads whereas Stack memory isn't.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   memory management   stack memory   heap memory   difference between   ebay     ABCD Corp  Society for Worldwide Interbank Financial Telecommunication (SWIFT)      intermediate        frequent

Try 1 Question(s) Test


 Q7. What is used to segregate load between multiple servers ?

a. Load Server
b. Load Manager
c. Load Traversal
d. Load Balancer
Anonymous
Ans. Load Balancer

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     server   server hardware


 Q8. What was the driving force to introduce default methods in Interfaces wef from Java 8 ?Core Java2016-07-14 14:36:49

Ans. Earlier any class implementing an interface was supposed to implement all methods declared in an interface. There was no place for optionally implementing all or subset of methods.Though we have abstract classes wherein we could have provided such a mechanism by declaring some methods as abstract while providing definition for some. But as Abstract classes have a body and are comparatively heavier than interfaces and interfaces associate closely to the concept of providing interfacing than abstract classes, Java might have though of providing optional implementation for default methods. This way same interface can be reused in variety of ways rather than making copies of an interface to suit different needs.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java 8   java8  interface default methods  default methods     Infoview Technologies  Oracle  Oracle Polska  Infosys  Tata Consultancy (TCS)  CEBS Worldwide


 Q9. How and when the Buffer is cleared when using Buffered Writer Classes ?Core Java2016-08-08 11:26:13

Ans. Buffer is cleared in 2 circumstances, i.e 1. naturally when the buffer is filled and 2. explicitly when the method flush is called ( for flushing the residual )

Ideally we just need to call flush once at the end of file writing so that the residual content should be dumped to file.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     BufferedWriter  Writer  PrintWriter  File io  flush  file handling



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. What is a factory design pattern ?Design2017-01-09 13:21:43

Ans. Factory Design Patterns is the pattern that recommends creation of separate Factory Object for creation of other object. So its like saying - If you want to create an object of ClassA, Talk to FactoryObject ( which is an object of FactoryClass ). FactoryObject in itself encapsulates the inputs and logic required to make the decision regarding the creation and construction of object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     design pattern  factory design pattern     EPAM  EMC  TMP Worldwide  Sapient  Ernst & Young (EY)   ThyssenKrupp Materials  Wipro  Scotiabank


 Q11. How do you check logs for your application in AWS ?AWS2017-06-02 12:57:26

Ans. We can do it by either going to Elastic Beanstalk -> Respective instance -> Logs

or using CloudWatch -> Logs -> Respective Log Group

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     aws logs  cloudwatch logs


 Q12. What is AWS CloudWatch ?AWS2017-06-04 14:51:00

Ans. Amazon CloudWatch is a monitoring service for AWS cloud resources like Beanstalk and DB instances. We can use CloudWatch to monitor the state of resources, collect metrices, set alarms and appropriate response to the alarm state.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     aws cloudwatch  aws




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

1 person from Boydton are looking for questions for 'Dws'. Connect with them to better prepare for your interview.Click here and post a message

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: