|
A public method is a method which can be called by any object.
Declaring a method public defines its access level. The other options for declaring visibility are private and protected. If undeclared, the default access level is package.
The draw(...) methods in the following class are all public methods.
public class DataArtist {
...
public void draw(String s) {
...
}
public void draw(int i) {
...
}
public void draw(float f) {
...
}
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.