0

What is the difference between a method and an object? (JAVA)

9th Oct 2019, 12:21 AM
FiteNite ben
FiteNite ben - avatar
3 ответов
+ 2
A Java object is a combination of data and procedures working on the available data. An object has a state and behavior. The state of an object is stored in fields (variables), while methods (functions) display the object's behavior.
9th Oct 2019, 1:01 AM
Odyel
Odyel - avatar
0
I ain't a teacher but this is best I can explain it. https://code.sololearn.com/cRs9v8on19kN/?ref=app
9th Oct 2019, 1:12 AM
Odyel
Odyel - avatar
0
Methods are parts of Classes. If you create an instance of a class you have an Object. Know you can call the methods from this class. If the class have one. If you scroll down you see the page for methods. https://www.sololearn.com/learn/Java/2151/?ref=app
9th Oct 2019, 11:36 PM
Stefanoo
Stefanoo - avatar