Often JAVA related questions are known to be asked in TCS interviews and placement papers. Below are five practice questions from JAVA that can help you to stay prepared for these interviews. These questions are quite basic ones and you can expect similar questions during TCS interviews or interviews of other prominent companies.
Interview Question 1
Why RDBMS vendors need to care about JDBC specifications ?
JDBC stands for Java Database Connectivity. Its a set of classes, interfaces and other api components with which JAVA applications can interact with databases. Hence for any RDBMS to work well with JAVA applications, it is essential that they adhere to JDBC specifications, else their product cannot be used with JAVA applications.
Interview Question 2
When two program parts run concurrently without one waiting for the next one for some kind of input, what are thse parts with independent execution paths within a program are called as? Also, by what generic name we can call such program?
Those program parts are called threads. The program is called multi-threaded program.
Interview Question 3
Can abstract class be used without inheriting?
No, abstract classes cannot be used by creating instances directly. They need to be inherited before usage.
Interview Question 4
What is the process of working with remote objects by issuing function calls as if the object is within the same JVM is called as ?
RMI or Remote Method Invocation. This is the process by which remote object's functions can be invoked as if they are present in the same JVM.
Interview Question 5
Can a single JAVA process contain more than one threads executing concurrently ?
Yes, it is possible. This is how multi-threading works.