What is the difference between static and non-static
variables?

Answer Posted / javeed

* Non-static which ia(instence variable) can be accessed
only inside a non-sattic method.

* A static variable can be axxessed in both static and non-
static methods.

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many unicode characters are there?

815


What is the use of arraylist in java?

826


Explain about java sdk?

824


Why can't we make a class private in java?

797


Is there is any difference between a scrollbar and a scrollpane?

791


Can constructor be inherited?

825


What is hashset in java?

809


What is the generic class?

726


What are predicates in java 8?

817


What is string in java?

779


How do you format in java?

802


How to handle a web browser resize operation?

787


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

820


What is the use of parse function in java?

741


Is integer a class?

805