Can u overload main()method.Give with example.
Answer
Is This Answer Correct ? | 40 Yes | 12 No |
Question { 10125 }
what is an object class?Explain its methods?
Answer
Is This Answer Correct ? | 4 Yes | 2 No |
What is Session and cookies?Explain in detail with an
example?
Answer
Is This Answer Correct ? | 12 Yes | 1 No |
Question { 7828 }
Real Time sample code for Encapsulation and Abstraction.
where to use abstract and where to use specifies like
public private.
Answer
Is This Answer Correct ? | 1 Yes | 10 No |
Question { 11164 }
why business logic written using servlets not in jsp. Jsp
used for presentation purpose. serlvet used for coding
business logic and controller logic. Reason for using
servlets in business logic.
Answer
Is This Answer Correct ? | 5 Yes | 7 No |
Question { 3978 }
How to send a request to garbage collector?
Answer
Is This Answer Correct ? | 2 Yes | 1 No |
Question { 16922 }
howmany types in garbage collection
Answer
Is This Answer Correct ? | 6 Yes | 24 No |
Question { 3933 }
life cycle of an applet?
Answer
Is This Answer Correct ? | 5 Yes | 0 No |
Question { 3693 }
I have written a program to connect to database using
odbc.Can this Application run on any Platform????
Answer
Is This Answer Correct ? | 0 Yes | 2 No |
Question { 16177 }
10. class Nav{
11. public enum Direction { NORTH, SOUTH, EAST, WEST }
12. }
13. public class Sprite{
14. // insert code here
15. }
Which code, inserted at line 14, allows the Sprite class to
compile?
a)Direction d = NORTH;
b)Nav.Direction d = NORTH;
c)Direction d = Direction.NORTH;
d)Nav.Direction d = Nav.Direction.NORTH;
Answer
Is This Answer Correct ? | 8 Yes | 3 No |
Question { 14670 }
33. try {
34. // some code here
35. } catch (NullPointerException e1) {
36. System.out.print(”a”);
37. } catch (RuntimeException e2) {
38. System.out.print(”b”);
39. } finally {
40. System.out.print(”c”);
41. }
What is the result if a NullPointerException occurs on line
34?
1 c
2 a
3 ab
4 ac
Answer
Is This Answer Correct ? | 14 Yes | 0 No |
Question { 17473 }
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.
Answer
Is This Answer Correct ? | 5 Yes | 2 No |