What is the static field modifier?
No Answer is Posted For this Question
Be the First to Post Answer
what is the significance of listiterator in java?
What is java lang object?
What’s meant by anonymous class?
Does list allow duplicates in java?
Can finally block be used without a catch?
is there any function in java to make the text to blink?
What happens when main () method is declared as private?
Can a class be subclass of itself?
can we take more than one null values for Unique constraints.
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.
for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert some stmts which can give output like no.of times numbers(1-10) returned. (for example if it returns 2 then i want output how many times 2 returned) like that i want output for no's 1 - 10 how many times each no returned. */ }
Write the algorithm to check the number non-leaf nodes in a tree.