There are several ways to simulate optional parameters in Java: Method overloading. void foo ( String a , Integer b ) { //... } void foo ( String a ) { foo ( a , 0 ); // here, 0 is a default value for b } foo ( "a" , 2 ); foo ( "a" ); One of the limitations of this approach is that it doesn't work if you have two optional parameters of the same type and any of them can be omitted. Varargs. a) All optional parameters are of the same type: void foo ( String a , Integer ... b ) { Integer b1 = b . length > 0 ? b [ 0 ] : 0 ; Integer b2 = b . length > 1 ? b [ 1 ] : 0 ; //... } foo ( "a" ); foo ( "a" , 1 , 2 ); b) Types of optional parameters may be different: void foo ( String a , Object ... b ) { Integer b1 = 0 ; String b2 = "" ; if ( b . length > 0 ) { if (!( b [ 0 ] instanceof Integer )) { ...