when tried with the code
class ewr
{
public void er(
String ls)
{
String ls_nn;
ls_nn = ls;
System.out.println("OK " + ls_nn);
}
}
abstract class aer extends ewr
{
public abstract void er(String ls);
}
public class ok implements aer
{
String rr;
public void er(String rr)
{
System.out.println("OOOO");//super.er(rr);
}
public static void main(String a[])
{
String rr = "Babai";
ok o = new ok();
o.er(rr);
}
}
this is the error faced.
interface expected where abstract is made
"abstract class aer extends ewr"
now retried with the following piece of code
class ewr
{
public void er(String ls)
{
String ls_nn;
ls_nn = ls;
System.out.println("OK " + ls_nn);
}
}
interface class aer extends ewr
{
public abstract void er(String ls);
}
public class ok implements aer
{
String rr;
public void er(String rr)
{
System.out.println("OOOO");//super.er(rr);
}
public static void main(String a[])
{
String rr = "Babai";
ok o = new ok();
o.er(rr);
}
}
got the following error at same line getting error <identifier> expected
please suggest why is this happening.