Pages

Sunday, 7 June 2015

Why java file need at least one class.?



*) Classes that Combine all the data and the methods(code) to       Manipulate the data you can also observed (think) of a class as a  Template used to create specific objects. 

*) From that template you can instantiate(create) many objects. All java programs consist of at least one class.

*) For Example :-

Employee class data like:  EmployeeName,Year,DateOfBirth,Salary etc.
Methods like : store/get the value of each piece of data,promote to next year etc.

*) Ex. class Employee

No comments: