aspose file tools*
The moose likes Beginning Java and the fly likes classes syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classes syntax" Watch "classes syntax" New topic
Author

classes syntax

lakshmi suji
Greenhorn

Joined: Jun 06, 2005
Posts: 2
what is the syntax of classes in java?
ganesh pol
Ranch Hand

Joined: Apr 29, 2005
Posts: 151
hi lakshmi
i think you are looking for how to declare classes in java

access_modifer other_modifers Class Classname
{
//variable
//methods
}

we can interchange the position of access modifiers and other modifers

we cannot declare more than one access modifiers in any defination i.e class and class member

other modifiers include which are valid for class declaration are
abstract final static

imp notes
1]we should not declare any class abstract and final
2]static keyword comes into play in case of inner classes
Hentay Duke
Ranch Hand

Joined: Oct 27, 2004
Posts: 198
I would suggest going through the sun tutorial. You're not going to get very far just knowing the syntax for declaring a class, without knowing what the modifiers mean.
 
Don't get me started about those stupid light bulbs.
 
subject: classes syntax