电脑爱好者之家

当前位置: 主页 > JAVA编程文档 >

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修饰的方法,因此是静
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)
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片