public class Sobrecarga { public static void main(String[] args) { System.out.println(suma(2,3)); System.out.println(suma(2.4,3.6)); System.out.println(suma(2,3,4)); System.out.println(.1 + .2); System.out.println(repetir("*",9)); System.out.println(repetir("-",20)); System.out.println(repetir("-")); System.out.println(repetir()); System.out.println(repetir(20)); } static int suma(int a, int b) { return a+b; } static double suma(double a, double b) { return a+b; } static int suma(int a,int b,int c) { return a+b+c; } static String repetir(String cadena, int veces) { String res=""; for(int i=0;i<veces;i++) { res+=cadena; } return res; } static String repetir(String cadena) { return repetir(cadena,10); } static String repetir() { return repetir("*",10); } static String repetir(int veces) { return repetir("*",veces); } }