Tuesday, July 17, 2012

Important Things to keep in Mind



Basic Outline of a Program



class Class_name
{
           public static void main(String arg[])
           {
                                 body
            }
}


Note:

  • The keywords are printed in BOLD in here.

  • S” in “String” must be in uppercase


  • The class with main method
    “public static void main(String
    arg[])”
    is the DRIVER CLASS

  • A class can contain
-collections of fields/variables [Attributes]
-operations [Behaviors/Method]

  • Use a semicolon[ ; ] at the end of a statement
But don’t use it in such cases like
- class declaration
- Method declaration
- Conditional statements


No comments:

Post a Comment

"You can always tell a real friend: when you've made a fool of yourself he doesn't feel you've done a permanent job."
- Laurence J. Peter

A friend always guide you to your destination, without leaving you in darkness...
Here I am, waiting for your precious comment, which gives strength to my writing.