# In the MOSH java course. How to pass the constructor input like 'paraname:value'

**URL:** <https://forum.codewithmosh.com/t/in-the-mosh-java-course-how-to-pass-the-constructor-input-like-paraname-value/2490>\
**Category:** Java\
**Created:** [February 6, 2021, 7:02am UTC](https://forum.codewithmosh.com/t/in-the-mosh-java-course-how-to-pass-the-constructor-input-like-paraname-value/2490 "2021-02-06T07:02:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chen](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@chen](https://forum.codewithmosh.com/u/chen)\
**Post date:** [February 6, 2021, 7:02am UTC](https://forum.codewithmosh.com/t/in-the-mosh-java-course-how-to-pass-the-constructor-input-like-paraname-value/2490/1 "2021-02-06T07:02:32Z")

</div>

Please ref this image url for my question.

[constructor input with paraname:value](https://drive.google.com/file/d/1ekplWczTKdUVQ2uTbw_uEFrR2mLJes5N/view?usp=sharing)

How to pass the constructor input like ‘paraname:value’  
new Employee(  
baseSalary:50\_000, hourRate:20)

and also

I can not pass the compile JDK 15 for ‘50\_000’  
How to do this?

Is this only for intellj ide?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [February 6, 2021, 10:41am UTC](https://forum.codewithmosh.com/t/in-the-mosh-java-course-how-to-pass-the-constructor-input-like-paraname-value/2490/2 "2021-02-06T10:41:27Z")

</div>

> [@chen](#):
>
> new Employee(  
> baseSalary:50\_000, hourRate:20)

Don’t write the parameter names when passing arguments to constructors or methods. The IDE will automatically add them for readability but they are nothing you type.

Just type `new Employee(50_000, 20)`

---

<div class="post-metadata">

**Author:** ![chen](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@chen](https://forum.codewithmosh.com/u/chen)\
**Post date:** [February 9, 2021, 1:50pm UTC](https://forum.codewithmosh.com/t/in-the-mosh-java-course-how-to-pass-the-constructor-input-like-paraname-value/2490/3 "2021-02-09T13:50:36Z")

</div>

Ok, I understand. Thanks your help.
