What happens to a static var that is defined within a method of a class?
No Answer is Posted For this Question
Be the First to Post Answer
Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?
What is System class and its purpose?
Is it possible to compare various strings with the help of == operator?
What collections you have worked on? Internal working of Hashmap?
how session will be expired ?
Explain importance of throws keyword in java?
What is string [] args?
Does a function need a return?
What is the diff. b/w Interfaces & Abstract class?
Why do we need public static void main(String args[]) method in Java...?
33. try { 34. // some code here 35. } catch (NullPointerException e1) { 36. System.out.print(”a”); 37. } catch (RuntimeException e2) { 38. System.out.print(”b”); 39. } finally { 40. System.out.print(”c”); 41. } What is the result if a NullPointerException occurs on line 34? 1 c 2 a 3 ab 4 ac
There are 2 classes, 1 LandAnimal and another WaterAnimal. There is another class Animal which wants to have the properties of both LandAnimal and WaterAnimal. How will you design this situation?