So it's day 2 of the learning journey and today we will get to know some of the basic terminologies used frequently in java.
-
Classes -
- classes can be identified as Nouns in the problem statement
- they are also called the blueprint of an object.
- as per the rule every single class should define the single object and should contain data related to that object only.
- For example - A human
-
Objects -
- also called as an instance of the class.
- consists of the exact values of the fields/properties defined by a class
- objects are always related to the class.
- For example - If humans are class then John is one of its objects.
-
Fields -
- fields can be of both objects as well as classes they are also called attributes or property.
- they define actual values that an object of a class can hold.
- only a method of an object should be allowed to change values of a field of the same object.
-
Methods -
- it can also be of both classes and objects.
- can be understood as behaviours of an object or procedures.
- are functions associated with an object.
- changes values of fields of an object.
-
Naming Convention in Java:-
- PascalCase => used for naming Class.
- camelCase => used for naming Fields, Methods.
- SCREAM_CASE => used for naming Constant Values.
- lowercase => used for naming packages.
- Some key features of Java:-
i. Object-Oriented
ii. Platform Independent
iii. Simple and Easy to learn
iv. Architecture Neutral
v. Portable
vi. Robust
vii. Multi-threaded
viii. Interpreted-byte code
ix. High performance
x. Distributed
xi. Dynamic
Top comments (0)