Try to refactor the common code into a private method:
void method(){
common();
}
void method(String s){
common();
//code 2
}
private void common() {
// code 1
}
solved Calling an overloaded method
Try to refactor the common code into a private method:
void method(){
common();
}
void method(String s){
common();
//code 2
}
private void common() {
// code 1
}
solved Calling an overloaded method