| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| There are 2 classes, 1 LandAnimal and another WaterAnimal.
There is another class Animal which wants to have the
properties of both LandAnimal and WaterAnimal. How will you
design this situation? | KPIT | 3 |
| What are the allowed, non-Unicode letter characters that
can be used as the first character of an identifier? | | 2 |
| public class Garbage
{
int a=0;
public void add()
{
int c=10+20;
System.out.println(c);
System.out.println(a);
}
public static void main(String args[])
{
Garbage obj=new Garbage();
System.gc();
System.out.println("Garbage Collected");
obj.add();
}
}
Above is a code in java used for garbage collection. object
obj has been created for the class Garbage and system.gc
method is called. Then using that object add method is
called.System.gc method if called the obj should be garbage
collected? | | 6 |
| what is connection pooling with example? | AMDOC | 1 |
| What is the Dictionary class? | | 1 |
| what is the purpose of the final in the try-catch-final | | 5 |
| Name the immediate superclass of the MenuComponent class? | | 1 |
| Name the package that most of the AWT events that supports
event-delegation model are defined? | | 2 |
| How to make class immutable | | 5 |
| why the wait,notify,notifyall methods are placed in object
class?these are the thread concepts why these methods are
placed in Object class? | Satyam | 2 |
| what is difference between prepare stetement and callable
starement with example? | CMC | 1 |
| What is constructor and virtual function? | | 4 |
| What is the basic functionality of DataOutput interface in
java? | TCS | 2 |
| Hi Friends, can you give difference between extending thread
class and implementing runnable interface. | | 3 |
| what is difference between front controller and action servlet? | | 2 |
| What is finally in exception handling? | | 6 |
| what are the methods of an object class? | | 3 |
| What is meant by class loader and how many types are there? | Apple | 1 |
| How to validate the request (Eg:user name and password) in
session(http session)? not in LDAP server ? | Saksoft | 1 |
| How are commas used in the initialization and iteration
parts of a for statement? | | 2 |
| |
| For more Core Java Interview Questions Click Here |