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

Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1613


What are classloaders?

608


What is bifunction in java?

687


Java is pass by value or pass by reference? Explain

544


java program with complete 4 oops concepts implemented example

2741






How do I get the | symbol on my keyboard?

601


Explain exception chaining in java?

621


Does treeset allow null in java?

527


What is stack explain?

512


What is your platform?s default character encoding and how to know this?

1761


What is string and example?

567


Can classes declared using the abstract keyword cab be instantiated?

571


How to instantiate member inner class?

640


What are the features of java?

541


Why do we use bufferedreader?

546