Given:
1. package test;
2.
3. class Target {
4. public String name = “hello”;
5. }
What can directly access and change the value of the
variable name?
1 any class
2 only the Target class
3 any class in the test package
4 any class that extends Target
Answer
Is This Answer Correct ? | 3 Yes | 0 No |
Question { 15843 }
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.
Answer
Is This Answer Correct ? | 4 Yes | 1 No |
Question { 15843 }
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.
Answer
Is This Answer Correct ? | 5 Yes | 1 No |
Question { 8349 }
Can an interface extands a class?
Answer
Is This Answer Correct ? | 9 Yes | 0 No |
Question { 11053 }
PreparedStatement is a pre compiled statement but where it's
pre compiled ?
Answer
Is This Answer Correct ? | 5 Yes | 1 No |
Question { 6238 }
all are saying java doesn't support multiple inheritance but
by default Object class is super class for all the user
defined classes and we can extend atmost one class so each
class can extend more than one class so java supports
multiple inheritance?i am confused with this,pls any one
explain me.
Answer
Is This Answer Correct ? | 4 Yes | 0 No |