Static Variable can referred in non-static method?

Answer Posted / nagarajan.s

yes,In Java static Variable can referred in non-static method,
but static method cannot referred non-static variable

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of a default constructor?

825


What is scope & storage allocation of global and extern variables? Explain with an example

788


Why singleton class is used in java?

814


What is the difference between a synchronized method and a synchronized block?

847


What is data object example?

718


Does java initialize arrays to zero?

711


What is gc()?

748


What does \ mean in regex?

841


Can we write class inside a class in java?

735


What do you mean by synchronized non access modifier?

760


Explain about procedural programming language or structured programming language and its features?

777


What is jrmp?

735


What happens when a thread cannot acquire a lock on an object in java programming?

781


What are the parts of a method?

750


Which access specifier can be used with class ?

717