java - why am i not able to implement a class in a class ,which already extends a class -


this dbinfo class:

public class dbinfo  stars table  static final string stars = "stars";  static final string first_name = "first_name";  static final string last_name = "last_name";   static final string create_star_table = "create table " + stars +                                                      "(" + _id + " integer primary key autoincrement, "                                                          + first_name + " text not null, "                                                         + last_name + " text not null);";   //stars in movies  static final string stars_in_movies = "stars_in_movies";  static final string star_id = "star_id";  static final string movie_id = "movie_id";  static final string create_star_in_movie_table = "create table " + stars_in_movies +                                                          "(" + star_id + " integer not null, "                                                             + movie_id + " integer not null, "                                                              + "foreign key (" + movie_id + ") references "+ movies +" (" + _id + ") "                                                             + "foreign key (" + star_id + ") references "+ stars +" (" + _id + "));";   //statistics table  static final string statistics = "statistics";  static final string right = "right";  static final string wrong = "wrong";  static final string create_statistics_table = "create table " + statistics +                                                      "(" + _id + " integer primary key autoincrement, "                                                      + right + " int not null default 0, "                                                     + wrong + " int not null default 0);"; 

}

and want implement class toy dbadapter class extends sqliteopenhelper

public class dbadapter extends sqliteopenhelper implements dbinfo{      private static final string database_name = "quizdb";     private static final int database_version = 9;      private static final string movies_file = "movies.csv";     private static final string stars_file = "stars.csv";     private static final string stars_in_movies_file = "stars_in_movies.csv";      private static sqlitedatabase mdb;     private static context mcontext;      public static sqlitedatabase getsqlitedatabase(context ctx){         if(mdb == null){             new dbadapter(ctx);         }         return mdb;     } 

and getting following error:

the type dbinfo cannot superinterface of dbadapter; superinterface must interface

you cannot implement class.

make dbinfo interface


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -