Can we override private method?
No Answer is Posted For this Question
Be the First to Post Answer
Why is String immutable?
What is the difference between throw and throws? What is the similarity between try and throw?
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?
How destructors are defined in java?
Can a lock be acquired on a class in java programming?
Why Java doesn’t support multiple inheritance?
Describe the various concepts related to object oriented programming (oop).
what is aberivation of java?
Name the method that is used to set a TextComponent to the read-only state?
What is meant by method?
Explain about abstract classes in java?
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