help I get error where the asterisks appear (I'm new to java) is on the eclipse platform

0
public class TablaDeMultiplicar {
    private int numMax;
    private int numTabla;


    public TablaDeMultiplicar() {
        this.numMax=0;
        this.numTabla=0;
    }

    public TablaDeMultiplicar (int m, int n) {
        this.numMax=m;
        this.numTabla=n;
    }

    public void setNumTabla(int n) {
        this.numTabla=n;
    }

    **public void GeneradorTabla() {**
         int i=1; {
    }    
            System.out.println(this.numTabla * + i +"="+this.numTabla*i);

    }
}   
    
asked by Juan Diego Zamora 04.10.2018 в 03:55
source

1 answer

0

The problem with this line

public void GeneradorTabla() {
         int i=1; {
    }    
            System.out.println(this.numTabla * + i +"="+this.numTabla*i);

    }

is that you are opening {} after declaring variable int i = 1 , it is not necessary since the first one that has the method includes everything

It should be like this

public void GeneradorTabla() {
         int i=1; 

            System.out.println(this.numTabla * + i +"="+this.numTabla*i);

    }
    
answered by 04.10.2018 в 03:58