A reader interviewed with IBM and sent the following questions in:
I have a scale and 7 balls. 1 ball is heavier than all the rest. How do I determine the heaviest ball with only 3 possible weighing attempts?
What is a linked list?
Name an advantage of linked list over array?
Also posted in C++, General |
By admin | February 24, 2005
A recruiter sent this simple set of interview questions for a programming position.
How can you defined OOP?
How can you use OOP in your projects/products/applications?
What is copy constructor?
How many types of copy constructor are there?
What shallow copy constructor does/behaves?
Does C++ support copy constructor?
Does Java support copy constructor?
(If the answer to the previous question was correct) Why [...]
Also posted in C++, General |
By admin | January 17, 2005
A reader sent it a set of Jakarta Struts questions used at his company.
What is Jakarta Struts Framework? - Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications. Jakarta Struts is robust architecture and can be used for the development of application of any size. Struts framework [...]
By admin | December 18, 2004
The following set was set in by a reader of the site:
Following are the questions from an interview I attended for in C#, ASP.NET, XML and Sql Server. I will try to add some more as soon as I recollect. Hope these questions will be useful for people attending interviews in this area.
What is the [...]
By admin | October 12, 2004
Can we use the constructor, instead of init(), to initialize servlet? - Yes , of course you can use the constructor instead of init(). There’s nothing to stop you. But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was no [...]
Also posted in Database, Networking |
By admin | October 10, 2004
Is is possible for an EJB client to marshal an object of class java.lang.Class to an EJB? - Technically yes, spec. compliant NO! - The enterprise bean must not attempt to query a class to obtain information about the declared members that are not otherwise accessible to the enterprise bean because of the security rules [...]
By admin | October 10, 2004
Is “abc” a primitive value? - The String literal “abc” is not a primitive value. It is a String object.
What restrictions are placed on the values of each case of a switch statement? - During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to [...]
By admin | October 9, 2004
What is the query used to display all tables names in SQL Server (Query analyzer)?
select * from information_schema.tables
How many types of JDBC Drivers are present and what are they?- There are 4 types of JDBC Drivers
JDBC-ODBC Bridge Driver
Native API Partly Java Driver
Network protocol Driver
JDBC Net pure Java Driver
Also posted in Database |
By admin | October 9, 2004
Are enterprise beans allowed to use Thread.sleep()? - Enterprise beans make use of the services provided by the EJB container, such as life-cycle management. To avoid conflicts with these services, enterprise beans are restricted from performing certain operations: Managing or synchronizing threads
Is it possible to write two EJB’s that share the same Remote and Home [...]
By admin | October 9, 2004
What is the purpose of finalization? - The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
What is the difference between the Boolean & operator and the && operator? - If an expression involving the Boolean & operator is evaluated, both operands [...]
By admin | October 9, 2004
Can there be an abstract class with no abstract methods in it? - Yes
Can an Interface be final? - No
Can an Interface have an inner class? - Yes.
Also posted in Networking |
By admin | October 9, 2004
What is garbage collection? What is the process that is responsible for doing that in java? - Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process
What kind of thread is the Garbage collector thread? - It is a daemon thread.
Also posted in Networking |