Can static methods access instance variables in java?
No Answer is Posted For this Question
Be the First to Post Answer
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
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
How does remove work in java?
What is operator?
Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
What is final method?
What is stringjoiner ?
how to deploy tomcatserver to weblogic server? write d following steps?
When do we use synchronized methods in java?
What is double data type?
Why should we use java?
what is java bean?where can we use it?