This is very similar to [this post](https://stackoverflow.com/questions/36242309/formatting-issue-with-adding-numbers-column-by-column-java/ "this post") except that the code is now part of an object instead of a method.

Again, this is how it should look: 

> 
> Enter 3 rows and 4 columns: 
> 
> 
> 1 2 3 4  
> 
>  5 6 7 8  
> 
>  9 10 11.2 12.5 
> 
> 
> You entered: 
> 
> 
> 1.0 2.0 3.0 4.0  
> 
>  5.0 6.0 7.0 8.0  
> 
>  9.0 10.0 11.2 12.5 
> 
> 
> The sums are: 
> 
> 
> 15.0 18.0 21.2 24.5
> 
> 
> 

This is my code:

```
else if (choice == 2) {

    // Prompt user
    System.out.println("You Selected Sum Columns");

    // Enter array values
    double[][] myList = new double[3][4];
    double[][] userList = new double[3][4];

    feature2 f2 = new feature2();

    f2.run(myList, input);

    f2.getInput(userList);

}

```

and

```
import java.util.Scanner;

public class feature2 {

    public void run(double[][] myList,Scanner input) {

        // 2D arrays are like spreadsheets ROW and Columns
        System.out.println("Enter " + myList.length + " rows and " + myList[0].length + " columns: ");
        for (int i = 0; i < myList.length; i++){
          for (int j = 0; j < myList[0].length; j++){
              myList[i][j] = input.nextDouble();
          }
        }

    }

    public void getInput(double[][] userList) {

        System.out.println("You Entered:");
        for (int i = 0; i < userList.length; i++) {
            for (int j = 0; j < userList[0].length; j++) {

                // chars are just ints!
                System.out.print(userList[i][j] + " ");
            }

            // every row
            System.out.print("\n");
        }

        System.out.println("\n The sums are:");

        for (int column = 0; column < userList[0].length; column++) {
              double total = 0.0;

              for (int row = 0; row < userList.length; row++){
                  // sum column
                  total += userList[row][column];
              }

              System.out.print(total + " ");
        }

        // space for formating
         System.out.print("\n");
    }
}

```

This is what happens instead:

```
Enter 1 Random 2D Chars 
Enter 2 Sum Columns
Enter 3 Identical Arrays
Any other input will exit2
You Selected Sum Columns
Enter 3 rows and 4 columns: 
1 2 3 4
5 6 7 8
9.1 10.2 11.3 12.9
You Entered:
0.0 0.0 0.0 0.0 
0.0 0.0 0.0 0.0 
0.0 0.0 0.0 0.0 

 The sums are:
0.0 0.0 0.0 0.0 

```

Now I have the opposite problem of the last post. Everything formats correctly, but it doesn't calculate properly. This is my only problem with the entire code.