The static method getConnection() from the type DBHelper sho
时间:2016-08-22 00:49 来源:未知 作者:机器AI 点击:次
| The static method getConnection() from the type DBHelper should be accessed The static method getConnection() from the type DBHelper should be accessed. 一些中文资料或者中文翻译资料上写的类方法和静态方法指的都是用static修饰的方法,因此是静态方法,而称之为类方法是因为调用该方法仅需要类名点方法名,比如Math.sqrt()。相应的另一种方法叫实例方法,必须得创建实例之后才能访问到该方法。 引用静态方法的时候,直接用类引用就可以了。直接DBHelper.getCon(),这样就可以了。 (责任编辑:机器AI) |