View RSS Feed

Core Java

Core Java tutorials.

  1. Fields, Methods, and Access Levels

    by , 03-02-2012 at 05:13 PM
    • Java classes consist of methods and fields. A field is same as a C++ data member & a method is similar to a C++ member function.
    • Each method & field possess an access level:

    o private: access is possible in this class only
    o (package): access is possible in this package only
    o protected: access is possible in this package only & also in all subclasses.
    o public: access is possible anywhere this class is present.
    • Every class consist of these
    ...
    Categories
    Classes