I am getting the result set from the controller to the jsp page where I have a table.

I inserted all the data coming from resultset to the of that table. 

**The problem I am having is that data is coming in only one column.** What I want to do is just limit the data to 5 in each column (5 in col 1, 5 in col 2, 5 in col3 of the same row).

Associated ID's: 

```
AKR
AK
AKRBS
AKRB
AKBS
AKRB
AKRBS
AKRBSW
AK
AKRE

```

and so on.....
['https://Stackoverflow.com/questions/15210996', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1847801/']
The syntax error is irrelevant in the long run. 

In Android your *must* start an Activity with an Intent. (See [this Developer's Guide article](https://developer.android.com/guide/components/activities.html#StartingAnActivity).) When you want to start Game use:

```
Intent intent = new Intent(this, Game.class);
startActivity(intent);

```

---

Also you declare `KEY_DIFFICULTY` as `final` (unchangeable):

```
public static final String KEY_DIFFICULTY = "org.example.sudoku.difficulty";

```

So your if-else block will never be true in any of these cases:

```
if (KEY_DIFFICULTY == String.valueOf(1))

```

*And* to compare Strings in Java you *must* use `equals()`, `==` will give inaccurate results. ([How do I compare strings in Java?](https://stackoverflow.com/q/513832/1267661))

---

If you want to pass the level of difficulty from one Activity to another use the Intent's extras, a `public` class variable, or another approach found in: [How do I pass data between Activities in Android application?](https://stackoverflow.com/q/2091465/1267661)

---

**Addition**  

You just added more code to your question and you have circular logic. 

```
- When you create RandomMathQuestionGenerator object, you will create a Game object
    - When you create Game object, you will create a RandomMathQuestionGenerator object
        - When you create RandomMathQuestionGenerator object, you will create a Game object
            - When you create Game object, you will create a RandomMathQuestionGenerator object
                - When you create RandomMathQuestionGenerator object, you will create a Game object
                    - When you create Game object, you will create a RandomMathQuestionGenerator object
                        - When you create RandomMathQuestionGenerator object, you will create a Game object
                            - When you create Game object, you will create a RandomMathQuestionGenerator object
                                - ...

```

This will only stop when your app throws a StackOverflowException.
```
number = num.Game(value);

```

I don't see a method `Game(int value)` in your `Game` class. You need to create this method in your class:

```
public int Game(int value){
   //code
}

```

I am also not sure you can name a method the same name as your class. I assume the fact it has a return value in the signature, it would be valid, but it would be bad practice to have a method name the same as your class anyway.