Write an algorithm program in java for the following question..
1) S is a set of integers.X is an integer obtained by sum of two digits in S.
Write logic for whether or not the X is from the S.
The time of algorithm should not exceed o(n logn).
No Answer is Posted For this Question
Be the First to Post Answer
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.
Explain the difference between abstract class and interface in java?
What are inbuilt functions?
Can u overload main()method.Give with example.
6 Answers IBM, Schimatic Technologies,
what are literals in java?
If two threads call a static method at the same point of time, what will happen?
What is the difference between throw and throws? What is the similarity between try and throw?
When should I use stringbuffer?
What is low level language in computer?
Why volatile is used in java?
What is method overriding in java ?
Why java is considered as platform independent?