Posted by: tonyteaching | June 18, 2009

meaning of words/terms in Java

static dan public biasanya dipake saat kita membuat class atau method

STATIC means the function can be called without creating an object of this class, it has no access to non-static fields.

PUBLIC means anyone can call it.

void artinya

It just says the method won’t return any value to its caller.
If you provide a method signature like
public static LONG doIt(double r) {
you will have to say something like
return Math.round(r) – 2; // << long integer
}
whereas a void method cannot return a value (like a PROCEDURE in Pascal).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: