what is the difference between instance variable and methods and their counterparts,clas variable and methods?
i understood that instance is other name for object but what i have undersood till know is that method is somewhat like function (but i could not understand the explaination given for this question in the book i am reading for self study). i am afraid of java plz help to clear my concepts
shivaniaroraji
0
Newbie Poster
Recommended Answers
Jump to PostI'll use the example of a Person class:
Instance variable - Variables that are unique to each class e.g. name, age
Class variable - Variables that are common among a class e.g. species
Method - Totally different. A subroutine or function in C languages where code is performed
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.