开发者

'public MyDBAdapter open()' What does 'open()' means after MyDBAdapter?

开发者 https://www.devze.com 2023-02-14 20:50 出处:网络
What does \'open()\' means after MyDBAdapter? MyDBAdapter is class name. public MyDBAdapter open() throws SQLException {

What does 'open()' means after MyDBAdapter? MyDBAdapter is class name.

public MyDBAdapter open() throws SQLException {
    db = dbHelp开发者_如何学运维er.getWritableDatabase();
    return this;
}


open is the method name. The fragment you pasted defines a public method called open which takes no arguments (there's nothing listed between the parentheses) which returns an instance of MyDBAdapter and may throw a SQLException.

You may want to have a look at the tutorial on method declaration: http://download.oracle.com/javase/tutorial/java/javaOO/methods.html

0

精彩评论

暂无评论...
验证码 换一张
取 消