How do you avoid global variables?
No Answer is Posted For this Question
Be the First to Post Answer
What is sortedmap in java?
What are daemon Threads in java?
what is the diffrences between platform independent and portable
What is the difference between method and constructor ?
how many access specifiers are available in java
Is boolean a wrapper class in java?
What does I ++ mean?
What does sprintf mean?
What are instance variables?
Can we instantiate interface in java?
11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.
I have a sorting issue with a Hashmap. My constraint is that I MUST use the Hashmap and work with existing code. I do a database query and place the results in a Hashmap. When I iterate thru the Hashmap, it loses the original alphabetical sorting done by the database. So, my problem is that I must sort the results coming out of the Hashmap which is then placed into another class.