Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| |||||||||||
Interview Questions and Answers - Order By Rating | |||||||||||
![]() | |||||||||||
| |||||||||||
Ans. TDD is a development process that involves short iterations: first an automated test case is written. Then, the code is written to pass that test, and finally one refactors the new code to acceptable standards. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() ![]() | |||||||||||
![]() | |||||||||||
| |||||||||||
Ans. int count = 15; int[] fibonacci = new int[count]; fibonacci[0] = 0; fibonacci[1] = 1; for(int x=2; x < count; x++){ fibonacci[x] = fibonacci[x-1] + fibonacci[x-2]; } for(int x=0; x< count; x++){ System.out.print(fibonacci[x] + " "); } | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?keyword=singleton+class&category=code | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?&category=code&searchOption&keyword=964 | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. It could be worthy to move a method to util class if the method needs to be shared, doesn't require polymorphic behavior and need not be overridden in special cases. Don't belong to one group through is-a relationship ( You can share through parent class method ) Don't implement a specific interface ( java 8 default methods ) Doesn't involve complex computing as you will be loosing the benefit of object state with just static method. Doesn't require polymorphic behavior as static methods don't participate in runtime polymorphism. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
![]() | |||||||||||