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

Post New Answer

More Core Java Interview Questions

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?

7 Answers   Ericsson,


What is System class and its purpose?

2 Answers  


Is it possible to compare various strings with the help of == operator?

0 Answers  


What collections you have worked on? Internal working of Hashmap?

1 Answers   Bravura Solutions,


how session will be expired ?

4 Answers   Satyam,






Explain importance of throws keyword in java?

0 Answers  


What is string [] args?

0 Answers  


Does a function need a return?

0 Answers  


What is the diff. b/w Interfaces & Abstract class?

6 Answers   Ericsson,


Why do we need public static void main(String args[]) method in Java...?

1 Answers  


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

5 Answers  


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?

6 Answers   KPIT,


Categories