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