• Monday, October 31, 2016

    Start Learning Java from Beginner to Expert

    Syed Masoom Rizvi

    Class is the collection of variables i.e. fields and methods. And a program is collection of classes.
    The basic code for declaring a class in Java is:

    class MyClass{

    //Your codes go here.


    When declaring a class, the name of class should be start with capital letter and cannot contains space or special character. If you want to write "My first class" then you should have to write it in Camel Case like: "MyFirstClass".

    CamelCase is very good approach in programming because it is human readable.