public class Demo
{
String data;
static String msg;
public void main(String[] args)
{
data="Java is superb...................!!"; //this is error line because in static methods on static variables can be accessed.
msg="Java is superb...................!!"; //this statment will work fine
}
}
No comments:
Post a Comment