Hello fellow Java-Members!
I am currently trying to solve the following problem, but I’ve been stuck in the last 2-3 days.
Problem:
Implement a method, which returns a 2D Array containing the results of the multiplicaton of all numbers for "int from - int to".int[][] getMultiplicationTables(int from, int to)
Also, the values of the array should be displayed in columns in the console.
What I’ve got so far is this:
public class MultiplicationTables { public void printTables(int from, int to) { for(int i = from; i < to; i++) { for(int j = from; j <= 10; j++) { System.out.println(i * j); } } } }
I just have no idea how to solve this with a 2D Array :/