Sunday, 27 March 2011

JAVA Common Interview Questions and Answers

Which containers use a Flow layout as their default layout?- Panel and Applet classes use the FlowLayout as their default layout. What are wrapper classes?- Wrapper classes are classes that allow primitive types to be accessed as objects. What are Vector, Hashtable, LinkedList and Enumeration?- Vector : The Vector class provides the capability to implement a growable array of objects. Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object’s keys. Hash codes are integer values that identify objects. LinkedList: Removing or inserting elements in the middle of an array can be done using LinkedList. A LinkedList stores each object in a separate link whereas an...

Monday, 7 March 2011

Yahoo! PHP interview questions and answers

Nick Halstead on his blog posts a list of interview questions from Yahoo! that a friend of his supplied, apparently free of NDA. Yahoo! is a strong PHP shop, with a few big names like Rasmus Lerdorf leading PHP development there. A few questions on PHP functions, and “what does this code do?” type of questions that seem a bit off-the-mark in PHP environment, with naming consistency like array_pop and shuffle (both do operations on array), and frequent swaps in the order of parameters passed in. Some fairly good questions, though: How do you debug a PHP application? - Interesting to see what the interviewee used outside of echo’s and error_log’s. Is PHP better than Perl? Discuss. and before that What’s the difference between the way PHP and Perl distinguish...

Newbie Java questions

If Runnable interface is better than Thread class, than why we are using Thread class? What is the need for Thread class? Why we are calling System.gc() method to garbage collection of unused object, if garbage collection is automatically done in Java by daemon thread in background process with regular interval? What is the significance of Marker interface? Why are we using, even though it has no method? Why we are always doing rs.next() in first line of while loop in retrieving data from database through result set? Please give me the details of synchronization? And which are the methods and elements used in it and why only that methods and variables? Why we are not using Java in real time based application, but instead we are using C or C++? Detail difference between...

Search here for "Freshers Jobs"