Przykład

public void print( String str ){
System.out.println("String: " + str ); //$NON-NLS-1$
}

public void print( Object obj ){
System.out.println("Object: " + obj ); //$NON-NLS-1$
}


public static void main( String[] args ){
WielePrzeciążonychMetod_Przykład example = new WielePrzeciążonychMetod_Przykład();
example.print( "Hello World!" ); //$NON-NLS-1$
example.print( (Object)"Hello World!" ); //$NON-NLS-1$
}

Rozwiązanie
Refaktoryzuj metody tak, aby miały inne nazwy.

public void printString( String str ){
System.out.println("String: " + str ); //$NON-NLS-1$
}

public void printObject( Object obj ){
System.out.println("Object: " + obj ); //$NON-NLS-1$
}


public static void main( String[] args ){
WielePrzeciążonychMetod_Rozwiązanie example = new WielePrzeciążonychMetod_Rozwiązanie();
example.printString( "Hello World!" ); //$NON-NLS-1$
example.printObject( "Hello World!" ); //$NON-NLS-1$
}