+ 2
Can you give a real life example about class and object in Java?
3 Respostas
+ 6
Why not read and understand the Java tutorial on Sololearn. Don't just gloss over it like you probably did the first time.
+ 3
imagine a human, what does human have in general ?
lets say, a name, race, nationality.
thats a class. its like a blueprint or general picture of something, but doesnt mean anything on its own.
now imagine certain person, you can identify their name, maybe their race and nationality.
thats an object, its an actual representation of "human"
0
I will take is example on human being. In this case, the human is a class and the man or woman are are objects.