What is the importance of static variable?
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)
How do you override a method in java?
What are kinds of processors?
What is casting?
why java does compile time polymorphism at run time ?
What is the importance of main method in Java?
What is use of super keyword in java?
Difference between a MenuItem and a CheckboxMenuItem?
What is variable length arguments in java?
What is linked hashset and its features?
Hi friends, i am new to java. can you explain how java is secured.
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