Avatar ·

Does Java support default parameter values?

Hello everyone! I just started learning Java after Python, and I have a problem. In Python, I'm used to writing functions where you can set default values for parameters, for example: ```python def create_user(name, age=18, is_active=True): print(f"User {name}, age {age}, active: {is_active}") ``` And call them with different numbers of arguments: `create_user("Anna")` or `create_user("Ivan", 25)`. This is very convenient. Now I'm writing in Java and want to do something similar. I have a `User` class with a method that sets up a profile: ```java public class User { public void setupProfile(String name, int age, boolean isActive) { // some logic } } ``` I want to be able to call `setupProfile("Anna")` — and then the age automatically