Computer Science, asked by sushilkumaragr468, 1 year ago

Java .

Define dynamic initialisation with example

Answers

Answered by suanshgill
1

Answer:Illustrate with an example in C++. Answer: Dynamic initialization of object refers to initializing the objects at run time i.e. the initial value of an object is to be provided during run time. Dynamic initialization can be achieved using constructors and passing parameters values to the constructors.

Explanation:

Answered by akshisaha06
0

Answer :- When a method is called in JAVA , and the value returned by this method is used to initialize the value of a variable , then it's called Dyanamic Initialization .

E.g. :- int x = sum (a , b)

Here , the value returned by method sum (which is being called ) will get stored in variable x . It's an example of Dyanamic Initialization .

Similar questions