27.10.2014 Views

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14 | Java<br />

14.1 In terms of inheritance, what is <strong>the</strong> effect of keeping a constructor private?<br />

________________________________________________________________pg 225<br />

14.2 In Java, does <strong>the</strong> finally block gets executed if we insert a return statement inside <strong>the</strong><br />

try block of a try-catch-finally?<br />

________________________________________________________________pg 226<br />

14.3 What is <strong>the</strong> difference between final, finally, <strong>and</strong> finalize?<br />

________________________________________________________________pg 227<br />

14.4 Explain <strong>the</strong> difference between templates in C++ <strong>and</strong> generics in Java.<br />

________________________________________________________________pg 228<br />

14.5 Explain what object reflection is in Java <strong>and</strong> why it is useful.<br />

________________________________________________________________pg 229<br />

14.6 Suppose you are using a map in your program, how would you count <strong>the</strong> number of<br />

times <strong>the</strong> program calls <strong>the</strong> put() <strong>and</strong> get() functions?<br />

________________________________________________________________pg 230<br />

CareerCup.com<br />

7 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!