Monday, October 12, 2015

Nitheen Kumar

Java Interview Questions and Answers At TCS

 
Java Interview Questions and Answers At TCS:

What is a native method?

A native method is a method that is implemented in a language other than Java.

Explain different way of using thread?

A Java thread could be implemented by using Runnable interface or by extending the Thread class. The Runnable is more advantageous, when you are going for multiple inheritance.

What are the two major components of JDBC?

One implementation interface for database manufacturers, the other implementation interface for application and applet writers.

What kind of thread is the Garbage collector thread?


It is a daemon thread.

What are the different ways to handle exceptions?

There are two ways to handle exceptions,
1. By wrapping the desired code in a try block followed by a catch block to catch the exceptions. and
2. List the desired exceptions in the throws clause of the method and let the caller of the method handle those exceptions.

What is nested class?

If all the methods of a inner class is static then it is a nested class.

What is HashMap and Map?

Map is Interface and Hashmap is class that implements that.

What are different types of access modifiers?

public: Any thing declared as public can be accessed from anywhere. private: Any thing declared as private can’t be seen outside of its class. protected: Any thing declared as protected can be accessed by classes in the same package and sub


Subscribe to get more Posts :