'public MyDBAdapter open()' What does 'open()' means after MyDBAdapter?
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
精彩评论