public class Car {
static int model = 2005;
static String name = "corvert";
private String color;
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
static void show() {
System.out.println("model" + amodel + "name" + name + "color" + this.color);
}
}
This method is not working with error non-static variable this cannot be referenced from a static context.