English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This is my program
interface values{
String piee = "3.14";
String alphaa = "2";
String namee = "priya";

}
abstract class pickvalue{
String values;
}

class pie extends pickvalue
{
pie(String value)
{
this.values = value;

}
}
class alpha extends pickvalue
{
alpha(String value)
{
this.values = value;
}
}
class name extends pickvalue
{
name(String value)
{
this.values = value;

}
}
class MyInterAbsDemo {
public static void main(String[] args) {
name objname = new name("sfsa");
System.out.println(objname.values);
}

}
not only this program..all the program which use this interface are not working some run time error like
java.lang.NoClassDefFoundError: interfacedemo/MyInterAbsDemo
Exception in thread "main"

Java Result: 1
is comming...what is the prob with my interce related programs.
thanks

2006-07-13 17:12:45 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

nobody there to answer

2006-07-13 21:34:29 · update #1

nobody there to answer

2006-07-13 21:34:38 · update #2

2 answers

As I said elsewhere (you really should only ask the same question ONCE). Your immediate problem is that you are missing the "public" keyword. It goes in front of "class MyInterAbsDemo {".

2006-07-14 11:19:40 · answer #1 · answered by BalRog 5 · 1 0

you have to implement the interface class
(ie) class A implements b,

2006-07-14 06:29:26 · answer #2 · answered by sridhar_vrigi 1 · 0 1

fedest.com, questions and answers