Forum : error: Myinfo() is abstart class does not override method Myclg()
Brief description  about Online courses   join in Online courses
View Priti m naik 's Profile

error: Myinfo() is abstart class does not override method Myclg()

hello sir,


public interface Mydetails{

void MyAge();
void MyName();
void MyClg();
void PrintMy();

}

public class Myinfo implements Mydetails{

int age;
String name;
String clg;


public void MyAge(int value)
{

age=value;
}

public void MyName(String string)
{

name=string;
}

public void MyClg(String string)
{
clg=string;
}

public void PrintMy()
{

System.out.println("my name is " name);
System.out.println("my age is " age);
System.out.println("my clg is" clg);
}


}

public class MyOwnCar{
public static void main(String[] args){
Myinfo m=new Myinfo();

m.MyAge(21);
m.MyName("priti");
m.MyClg("msrit");

m.PrintMy();

}
}
Asked by Priti m naik | Aug 29, 2010 |  Reply now
Replies (4)
View priti m naik 's Profile
ok thx
Aug 30, 2010
View vijay kumar thota 's Profile
course is for reference ,,,refer other books and examples.
gain more from other sources...
follow standard syntax's.
Aug 30, 2010
View priti m naik 's Profile
but in the course its given to put the interface as public y does it differ herre
Aug 30, 2010
View vijay kumar thota 's Profile
interface Mydetails
{
public void MyAge(int value);
public void MyName(String string);
public void MyClg(String string);
public void PrintMy();
}

class Myinfo implements Mydetails
{
int age;
String name;
String clg;

public void MyAge(int value)
{
age=value;

}

public void MyName(String string)
{
name=string;

}

public void MyClg(String string)
{
clg=string;

}

public void PrintMy()
{
System.out.println("my name is "+name);
System.out.println("my age is "+age);
System.out.println("my clg is"+clg);
}
}

public class MyOwnCar
{
public static void main(String [] args){
Myinfo m=new Myinfo();

m.MyAge(21);
m.MyName("priti");
m.MyClg("msrit");
m.PrintMy();

}
}

dear priti...now check the output,,,U'll get it
Aug 29, 2010