| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Is there any need to import java.lang package? | Sun-Microsystems | 9 |
| Name the method of a Container that can be used to cause a
container to be laid out and redisplayed? | | 1 |
| whats is the use of final,in which situation final can be
used in the application? | DNS | 2 |
| what models are available for event handling? | | 1 |
| what is an anonymous class? | TCS | 5 |
| What is interface and its use? | HCL | 6 |
| steps to connect with Oracle Databse using TYPE-2 Jdbc driver. | | 1 |
| What is lazy activation? | CMC | 1 |
| Program to output as below formate:
1
2 3
4 5 6
7 8 9 10 | Huawei | 2 |
| Difference between prefix and postfix forms of the
++operator? | | 2 |
| Given:
11. public static void main(String[] args) {
12. Integer i = uew Integer(1) + new Integer(2);
13. switch(i) {
14. case 3: System.out.println(”three”); break;
15. default: System.out.println(”other”); break;
16. }
17. }
‘What is the result?
1 three
2 other
3 An exception is thrown at runtime.
4 Compilation fails because of an error on
line 12.
| | 3 |
| please tell me what is wrapper class in java with example ? | | 3 |
| Difference between this(), super()? | | 8 |
| what is a static block? | | 4 |
| 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 webservices | Mind-Tree | 4 |
| what is session facade ? | | 2 |
| How to validate the request (Eg:user name and password) in
session(http session)? not in LDAP server ? | Saksoft | 1 |
| Name the method that is used to set a TextComponent to the
read-only state? | | 1 |
| How will you create the class for the following scenario?
Employees under one employee?
| Bally-Technologies | 2 |
| |
| For more Core Java Interview Questions Click Here |