ok i have declared a variable of type Object but
Object sql;
if (mysql) sql = new Mysql(); else sql = new Sqlite();
sql.Update(name);
ERROR: Cannot resolve method 'Update' in 'Object'
...
Type: Posts; User: Mikyc
ok i have declared a variable of type Object but
Object sql;
if (mysql) sql = new Mysql(); else sql = new Sqlite();
sql.Update(name);
ERROR: Cannot resolve method 'Update' in 'Object'
...
I mean that I have a settings file from where I get the data, and if the user puts, for example, mysql there, then it will work with the Mysql class, and if sqlite, then Sqliite. the question is how...
there are 3 classes in two of which are the same methods (sqlite3 and mysql databases), and in the third check.
Is it possible to declare them in 1 variable by type:
Mysql or Sqlite sql;
And...