187k views
0 votes
What are fields? Instance variables? object? methods?

1 Answer

4 votes

Answer:

Explained

Step-by-step explanation:

Fields: Fields represent data and should be a noun. It should begin with a lower case letter.

Instance variable: it is a variable defined in class but outside the constructor and the method. instance variables are created when an object is instantiated.

Object: An object is the basic unit of object oriented programming language.and represents the real life entities. An object consists of state behavior and properties.

Method: Method in a collection of statements that perform some specific task and return the result to the caller.

User Jolleyboy
by
6.3k points