What are the standards to place package statement within a
source code file?
Answer / ravikiran
it must be the first statement and ended with a semicolon
and should be only one
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of toarray () in java?
How will you convert an ArrayList to Arrays?
Explain the importance of finally block in java?
Which class should you use to obtain design information about an object
What is a get method?
What is executor memory?
What is race condition ?? (Threading concept) TCS 2 sept10
What is blank final variable?
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.
we cannot create an object of interface but we can create a variable of it
What are the differences between processes and threads?
what is polymorphism with example?types of polymorphism?