Non Static Variables

Can be accessed only by creating an instance.
It will be not be updated when a new instance of the object is created.

public class NonStaticVariables {
 public NonStaticVariables() {

    private   int instancecount;
    public static void main(String args[]){
        NonStaticVariables nsv=new NonStaticVariables();
  NonStaticVariables nsv1=new NonStaticVariables();




Popular posts from this blog

Spring MVC- Redirect from one controller to another

Integrating Struts2 with Spring Security using Custom Login Form