How can you initialise a class member within a class?
Answers
Answered by
1
Answer:
To initialize a class member variable, put the initialization code in a static initialization block, as the following section shows. To initialize an instance member variable, put the initialization code in a constructor.
Explanation:
Hope this answer is helpful for you.
Thank you.
PLEASE MARK ME BRAINLIEST
Answered by
1
To initialize a class member variable, put the initialization code in a static initialization block, as the following section shows. To initialize an instance member variable, put the initialization code in a constructor.
Similar questions
Accountancy,
3 months ago
Physics,
3 months ago
Math,
3 months ago
Math,
7 months ago
Social Sciences,
7 months ago
English,
11 months ago
Art,
11 months ago