i just need clarification on some things, for report writing.
i know that "public void" defines method, so what do the following do/mean.
public class
public Insets
public boolean
final string
final int
int
Point
float
Thread
char
boolean
class classname
parent
sorry to sound so stupid, i just dont know what to refer to them as when writing this report. i dont want to keep refering to everything as class or method etc.
thanks for any help.
04-01-2004, 11:25 PM
Phaelax
You have public and private. They dertermine which methods you can use when you create an object of a class.
Class object = new Class()
object.anyPublicMethod()
If it's a private method, object cannot use it. Only the class itself may call private methods. Void mean the method returns nothing. In place of void, you can have double, int, char, string, or any object type you've made. It defines the return type of the method.
Class defines a new class.
class MyClass
{
}
That creates a new class called MyClas from which you can create an object of. And object is an instance of a class.
public Insets
public boolean
Those would be the beginning definitions of methods. Public methods which will return an object of type Insets, and a boolean object. Boolean objects can only equal one of two things. True and False.
I'd reccommend you find a begginer's book for java. Any begginers book would discuss all this, and probably do a much better job defining it than me.
04-02-2004, 02:30 AM
tarun
thanks for the help anyway, do you know of any good books for this?