About 50 results
Open links in new tab
  1. Use of Initializers vs Constructors in Java - Stack Overflow

    Apr 30, 2009 · Static and Instance Initializers are two such techniques. My question is when would one use an initializer instead of including the code in a constructor? I've thought of a couple obvious …

  2. java - What is an initialization block? - Stack Overflow

    Oct 21, 2010 · We can put code in a constructor or a method or an initialization block. What is the use of initialization block? Is it necessary that every java program must have it?

  3. How to use provideAppInitializer instead of APP_INITIALIZER

    Jan 13, 2025 · I have a library that should run when the app boots. I see that Angular 19 now use provideAppInitializer. I did use the automatic angular ng update migration cli and it changed the …

  4. c# - What's the difference between an object initializer and a ...

    Apr 11, 2009 · An object initializer is code that runs on an object after a constructor and can be used to succinctly set any number of fields on the object to specified values. The setting of these fields …

  5. C++11 member initializer list vs in-class initializer?

    Dec 8, 2014 · The expression-list or braced-init-list in a mem-initializer is used to initialize the designated subobject (or, in the case of a delegating constructor, the complete class object) according to the …

  6. Why can't a T&& template parameter be deduced from an initializer list?

    A function parameter for which the associated argument is an initializer list but the parameter does not have std::initializer_list or reference to possibly cv-qualified std::initializer_list type.

  7. What is a designated initializer in C? - Stack Overflow

    Aug 15, 2022 · The Designated Initializer came up since the ISO C99 and is a different and more dynamic way to initialize in C when initializing struct, union or an array. The biggest difference to …

  8. python - Initializer vs Constructor - Stack Overflow

    I have heard that the __init__ function in python is not a Constructor, It's an Initializer and actually the __new__ function is the Constructor and the difference is that the __init__ function is called after the …

  9. angular 19 - APP_INITIALIZER deprecation - Stack Overflow

    Nov 20, 2024 · I am trying to upgrade from Angular 18 to 19. Automatic migration changed the following code providers: [ { provide: APP_INITIALIZER, useFactory: initializeApp1, deps: [

  10. When to use the brace-enclosed initializer? - Stack Overflow

    Apr 2, 2012 · For types that accept std::initializer_list though obviously sometimes the non- std::initializer_list constructors are needed (the classical example being std::vector<int> …