package morepackage;
public class Subclass extends Superclass {
public static void main ( String args[] )
{
String name = super.text;//error in this line
String name1 = Superclass.text;//no error in this line
}}
The code of the superclass is:
public class Superclass {
static String text = "flowers";
}
Can anyone please tell me why the line String name = super.text
is showing error
While the line String name1 = Superclass.text;
is not showing error ?