Tag

Constructors

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 19, 2024 · Fundamentals

Why We Need Secondary Constructors and How to Implement Them in Kotlin

The article explains the importance of auxiliary (secondary) constructors for flexible object creation, contrasts PHP's lack of support with Kotlin's feature, and demonstrates clean implementations using primary constructors and static factory methods to improve readability and maintainability.

ConstructorsKotlindesign patterns
0 likes · 4 min read
Why We Need Secondary Constructors and How to Implement Them in Kotlin
php中文网 Courses
php中文网 Courses
Apr 1, 2024 · Backend Development

Understanding Constructors in PHP Inheritance

This article explains how PHP constructors work in class inheritance, detailing when child classes must explicitly call parent constructors, how required parameters affect this behavior, and provides clear code examples illustrating proper use of the parent::__construct syntax.

ConstructorsPHPbackend
0 likes · 8 min read
Understanding Constructors in PHP Inheritance
IT Services Circle
IT Services Circle
Feb 4, 2022 · Fundamentals

Understanding the Execution Order of Static Blocks, Instance Blocks, Constructors, and Regular Code Blocks in Java

This article explains the definition, execution timing, and practical uses of Java static code blocks, instance (constructor) code blocks, constructors, and regular code blocks, and demonstrates their exact execution order—including parent‑child class initialization—through clear code examples and output analysis.

Code BlocksConstructorsExecution Order
0 likes · 8 min read
Understanding the Execution Order of Static Blocks, Instance Blocks, Constructors, and Regular Code Blocks in Java
Jike Tech Team
Jike Tech Team
Sep 25, 2019 · Mobile Development

Why Kotlin Differs from Java: Constructors, init Blocks, and Static Alternatives

This article explores the key differences between Kotlin and Java for Android development, covering constructors, init blocks, val versus final, static equivalents with companion objects, top‑level declarations, arrays, collections, sequences, visibility modifiers, and includes practical exercises.

AndroidCollectionsCompanion Object
0 likes · 23 min read
Why Kotlin Differs from Java: Constructors, init Blocks, and Static Alternatives