Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classes syntax

 
lakshmi suji
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the syntax of classes in java?
 
ganesh pol
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic