Static Variable can referred in non-static method?

Answer Posted / rableen khurana

Yes we can access static variable in non-static
methods....and we can access instance variable in static
method also with the help of object......

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstract class constructor called?

571


What is a flag and how does it work?

511


What do you mean by aggregation?

570


What an i/o filter in java programming?

608


What is the difference between the font and fontmetrics classes in java programming?

507






What is string pool in java?

568


Is java hard to learn?

465


What is the difference between hashmap and hashtable? What is an interface?

510


What is a boolean flag in java?

571


Do I need java on my pc?

511


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1025


Is java written in c?

547


How to perform merge sort in java?

587


What type of variable is error flag?

591


Can we declare the main method of our class as private?

557