Java: define terms initialization, declaration and assignment

后端 未结 7 606
轻奢々
轻奢々 2020-11-22 16:12

I find the defs circular, the subjects are defined by their verbs but the verbs are undefined! So how do you define them?

The Circular Definitions

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 17:06

    declaration: whenever you define a new variable with its type

    assignment: whenever you change the value of a variable by giving it a new value

    initialization: an assignment that is done together with the declaration, or in any case the first assignment that is done with a variable, usually it's a constructor call for an object or a plain assignment for a variable

提交回复
热议问题