+ 3

Can anybody tell me what is INITIALISATION and DYNAMIC INITIALISATION? Please answer fast...

computer science

7th Nov 2017, 5:32 PM
Shantanu Kundu
Shantanu Kundu - avatar
2 Answers
+ 14
initialization when you assign a value to a variable. dynamic initialization may after performing some calculation and then assign a value; ex: int age = 18;// initialization ###### when a user sign up into a website by intering some info. ex firstname lastname email ... in the back office it may be like that User user = new User (getFName(), getLName (), getEmail ()); the user object now it dynamically initialized by the constrictor.
10th Nov 2017, 5:14 PM
Said BAHAOUARY
Said BAHAOUARY - avatar
+ 3
INITIALISATION and DYNAMIC INITIALISATION do the same thing: INITIALISATION. The first is for variables defined in code, the later is when the objects are created on the fly with new. see the code https://code.sololearn.com/cXnVN9PNN3k1/?ref=app the first one is normal, second is dynamic
8th Nov 2017, 6:21 AM
Sameer N
Sameer N - avatar