SHARING KNOWLEDGE EACH OTHERS!

Saturday, December 27, 2008

Java - Separators


There are a few characters that are used as separators in java. The mostly commonly used separator in java is the semicolon. As you have seen, it is used to terminate statements.

() called Parentheses used to contain list of parameters in method definition and invocation. Also used for defining precedence expressions in control statements, and cast type.

Braces {} used to contain the values of automatically initialized arrays. Also it is used to define a block of code, for classes, methods, and local scopes.

Brackets [], it is used to declare array types. Also it is used when dereferencing array values.

Comma , it separates consecutive identifiers in a variable declaration. Also it is used to chain statements together inside a for statement.

Period “ .” it is used to separate package names from sub packages and classes. And it is also used to separate a variable or method from a reference variable.


GO TO CHAPTER 2


Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Enter your email address:

 

SOFTWARES AND PLATFORMS Copyright © 2010 LKart Theme is Designed by Lasantha