I am in a stage of transition from C# to Java.
I remember in C# we can call a nullable method with or without passing arguments. for example in C#
C#
public void method (int? x){
logic goes here
}
I can call the above method like this without passing any parameters in c#
method();
how to do it in Java?? In Java, it's forcing me to call the method by passing an argument, if there is no argument it's forcing me to at least pass a null. my problem here is I want to edit an existing method, but this method was called at many places, so I need to edit in many places which is frustrating.
Java
public void method (Integer x){
logic goes here
}
method(null);