Here is my simple solution, I think it's better than using double for loop
'''
public static int uniquePaths(int m, int n) {
if(m == 1  n == 1) return 1;
return uniquePaths(m1, n) + uniquePaths(m, n1);
}
''''
Java 2 line Recursion+DP

It is not dynamic programming, it's just recursion  and a very inefficient one, because it will calculate values multiple times. You can try for yourself with values like n=20, m=20. It is in no way better than using for loops  it seems shorter, but it's a wrong solution on basic performance level.
You could make a dynamic programming out of it by adding an array to remember values you've calculated in previous steps.