# Overload Constructor

**URL:** <https://community.haxe.org/t/overload-constructor/2733>\
**Category:** Haxe\
**Created:** [October 24, 2020, 1:48pm UTC](https://community.haxe.org/t/overload-constructor/2733 "2020-10-24T13:48:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bifi](https://avatars.discourse-cdn.com/v2/letter/b/ee7513/32.png) [@Bifi](https://community.haxe.org/u/Bifi)\
**Post date:** [October 24, 2020, 1:48pm UTC](https://community.haxe.org/t/overload-constructor/2733/1 "2020-10-24T13:48:32Z")

</div>

Is it possible to define multiple constructors for a class ?

Is this statement still valid here ?  
[StackOverflow](https://stackoverflow.com/questions/57836088/how-can-i-solve-duplicate-constructor-error-in-haxe)

I have a Java class with 7 different ways to build a constructor (also with different data types).

Greetings

---

<div class="post-metadata">

**Author:** ![RealyUniqueName](https://community.haxe.org/user_avatar/community.haxe.org/realyuniquename/32/10_2.png) [@RealyUniqueName](https://community.haxe.org/u/RealyUniqueName)\
**Post date:** [October 24, 2020, 8:53pm UTC](https://community.haxe.org/t/overload-constructor/2733/2 "2020-10-24T20:53:21Z")

</div>

Here’s an example how to describe an extern class with multiple constructors:  
[https://github.com/HaxeFoundation/haxe/blob/7ae69994422a17dce5adb198ce6fafe9ce3f67c7/std/java/lang/Boolean.hx#L37-L38](https://github.com/HaxeFoundation/haxe/blob/7ae69994422a17dce5adb198ce6fafe9ce3f67c7/std/java/lang/Boolean.hx#L37-L38)
