Java tutorial for beginners playlist
In this video we will discuss
1. Objects
2. Classes
3. State and Behavior
4. Naming Conventions
What is Object Oriented Programming
It is an approach to problem solving where all actions are performed by objects. These objects interact with each other by passing messages to each other
What are Objects
Conceptually similar to real world objects
Have some state
Display some behavior
What is a class
A class is a template or blueprint for creating objects
What is an object
Object is an instance of a class
Class Naming Convention
Should start with Upper case letter (Pascal Case)
Should be a Noun – as it represents something in real world
Example : Employee, Person, Car etc
Method Naming Convention
Should start with Lower case letter (Mixed Case)
Should be a Verb – to describe what method does
Example : print() performTask() etc
Field Naming Convention
Should start with Lower case letter (Mixed Case)
Should describe what the value represents
Example : placeOfBirth, experienceInYears
Constants : should be all UpperCase. Example : MAX_VALUE