| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What are Access Specifiers and Access Modifiers. | TCS | 4 |
| byte a=5;
byte b=5;
byte c=a+b;
System.out.println(c);
whats the o/p? | Wipro | 5 |
| What is the Vector class? | | 3 |
| If I have 1000 objects and my requirement is to sort them
quickly, then which collection would you recommend and why? | KPIT | 3 |
| How to access a method that it declared as protected? | | 3 |
| what is the JNDI? | | 3 |
| Given:
10. interface A { void x(); }
11. class B implements A { public void x() { } public
voidy() { } }
12. class C extends B { public void x() {} }
And:
20. java.util.List list = new java.util.ArrayList();
21. list.add(new B());
22. list.add(new C());
23. for (A a:list) {
24. a.x();
25. a.y();;
26. }
What is the result?
1 Compilation fails because of an error in
line 25.
2 The code runs with no output.
3 An exception is thrown at runtime.
4 Compilation fails because of an error in
line 20.
| | 1 |
| what is a thread? | IBM | 10 |
| What are uses of Hash Code? | Cognizent | 2 |
| What is static and a non-static inner class? | | 3 |
| diff b/w sleep(1000) and wait(1000)? | Huawei | 2 |
| what is the use/perpose of having a method antive? | | 2 |
| 1).what is the difference between below examples
String s="vijay";
String s=new String("vijay"); | TCS | 11 |
| how exactly garbage collection take place?
| | 4 |
| What is the superclass of exception? | | 2 |
| which swing component is similar to rich text box in .net/vb | | 1 |
| what is business delegate? | TCS | 2 |
| Why we use static and synchronized in method for single
thread model
example:
public static synchronized add(){} | | 1 |
| Difference between ?System.out.println?
and ?System.error.println?? | Sai-Softech | 2 |
| As a developer what steps do you take to improve the
performance? | | 3 |
| |
| For more Core Java Interview Questions Click Here |