What are fields and methods of a class?
Answers
Answered by
2
Explanation:
Both methods and fields have a type, the type of data they contain (such as an int or double). Fields and methods exist within classes, and methods can contain fields. However, methods perform tasks, while fields hold values.
Answered by
0
Both methods and fields have a type, the type of data they contain (such as an int or double). Fields and methods exist within classes, and methods can contain fields. However, methods perform tasks, while fields hold values.
Similar questions