Why & when a object should be created from class. Why a class can�t has static fields and method only.
everybody says in OOP ,a object should be created from a class����
In oops ,generally break the functionality in many class, as per oop standard, if I want to finish a task ,then all class should interact, here without creating a object I can finish all the task
I explain with below example then it will be more clear
Interest calculator
Consider a table has principle amount ,period and interest rate.to calculate the functionality simply I write a method in a class to get all data from table and calculate the interest, here why I need a object creation
String is a class. I want to hold different value of string, and then I have to create more objects otherwise it not needed.
String a=�w�;
String h=�H�;
In ORM like hibernate, class represent the table structure so for each record o object should be created. this the scenario where object creation exactly needed.
These thing confuse me for long time. Please correct if am wrong