Computer Science, asked by priyanshicpchaudhary, 7 months ago

differentiate between static and dynamic initialization ​

Answers

Answered by Anonymous
15

Answer:

please mark brillist answer

Attachments:
Answered by Anonymous
3

The difference between static initialization and dynamic initialization:

  • A static initialization in java is a particular block that is made to run before the main () method in java whereas dynamic initialization refers to the initiation of the project during the rum time.
  • Example for static initialization: class static linit{ public static int x; static{x = 32} is the basic rqeuired program.
  • Example for dynamic initialization: int a = square(n), where n is dynamically assigned to through square function where square() performs the square function.

Similar questions