| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| which method is used to know the status of the Thread? | Honeywell | 6 |
| What is the differnence between String Buffer and String
builder despite having knowledge that String builder is
faster than String Buffer and last one is threadsafe.please
tell another important difference. | | 3 |
| 11. static class A {
12. void process() throws Exception { throw new Exception();
}
13. }
14. static class B extends A {
15. void process() { System.out.println(”B”); }
16. }
17. public static void main(String[] args) {
18. new B().process();
19. }
What is the result?
1 B
2 The code runs with no output.
3 Compilation fails because of an error in
line 12.
4 Compilation fails because of an error in
line 15. | | 1 |
| We have two methods to create methods the threads.
1. Implementing runnable interface
2. Extending to thread class and overriding run method.
Among these two which one is better and why?
Please explain me in detail. | | 2 |
| What is static and a non-static inner class? | | 3 |
| What are the types of statement? explain | SysBiz | 1 |
| Name the runtime exceptions that occurs frequently? | | 4 |
| explain System.out.println() | CTS | 7 |
| why to use transient variables when static variables can be
used for Serialization | | 3 |
| What are virtual methods? | TCS | 1 |
| What is the differenc between Enemuration interface and
iterator interface according to accessing? | | 4 |
| What is the difference between throw and throws?
What is the similarity between try and throw? | | 2 |
| Howmany address lines are required to addressing 1 MB
memory? | | 3 |
| What is the purpose of setAutoCommit() ? | Google | 1 |
| if arraylist size is increased from initial size what is
the size of arraylist...suppose initial is 100 , if i add
101 element what is the size... | | 6 |
| what is the difference between HashMap and Hashtable | Value-Labs | 8 |
| Does a class inherit the constructor of its super class?if
it does, how can you hide that constructor? if it doesnot
how can you call it from the sub class? | | 1 |
| How can final class be used? | Wipro | 2 |
| What is the catch or declare rule for method declarations? | | 1 |
| What advantage does an entity bean have over a sessin bean? | Adobe | 3 |
| |
| For more Core Java Interview Questions Click Here |