What is the byte range?
No Answer is Posted For this Question
Be the First to Post Answer
we have a 100 classes at that time which class we have to write main method? pls help me
suppose we have an interface & that interface contains five methods. if a class implements that interface then we have to bound that to give tha definition of all five methods in that class. If we declare that class as abstract then can we call only two methods to give the deinition of that method & i don't want to give the definition of all the methods? can it possible
Explain about exception propagation?
What is java autoboxing?
How to create a custom exception?
List types of storage classes in java?
What is your platform’s default character encoding?
When to use runnable interface vs thread class in java?
Why do we use public static with the main function in Java?
13 Answers College School Exams Tests, Infosys,
What is a local block?
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.
What are java packages? What's the significance of packages?