Zadanie jest takie,ze mam wpisac n i m.Jak zrobić by w mainie wartosci m i n były znane w mainie.
Przepraszam ,że pytam o takie banały,ale nie ogarniam Javy.
public class Tablice {
private int m;
private int n;
public Tablice(int val1, int val2) {
this.n = val1;
this.m = val2;
}
public int getN() {
return n;
}
public int getM() {
return m;
}
public static void main(String[] args)
{
Scanner skaner=new Scanner(System.in);
int temp=skaner.nextInt();
int temp2=skaner.nextInt();
Tablice object=new Tablice(temp,temp2);
System.out.println(" "+m+" "+n);
}
}