-
quick help needed
hi guys,
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.
-
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.
-
thanks for the help anyway, do you know of any good books for this?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks