What is the importance of static variable?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

3) Suppose you are a very rich person, having 50 rooms and you have lost the key for one of the room's. How effectively you can find this key? (Qs2 and Qs3 are related)

3 Answers   RBS,


How do you override a method in java?

0 Answers  


What are kinds of processors?

0 Answers  


What is casting?

3 Answers  


why java does compile time polymorphism at run time ?

6 Answers   CTS, TCS,


What is the importance of main method in Java?

0 Answers  


What is use of super keyword in java?

0 Answers  


Difference between a MenuItem and a CheckboxMenuItem?

1 Answers  


What is variable length arguments in java?

0 Answers  


What is linked hashset and its features?

0 Answers  


Hi friends, i am new to java. can you explain how java is secured.

2 Answers  


hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class

1 Answers  


Categories