Q:

Using a instance of a method

I was wondering if someone could help explain how to call a instance of a class.
For example originally I had a file called "Driver"
Then it has a main method that has all the instances needed for a file to run.
Then in that main file it access another file called with a "Games".
So when I run the program "Driver" which has the following code:
import java.util.*;

public class Driver
{

      public static void main (String[] args)
      {
  
            GameRunner roul = new GameRunner ();
       }
}

Then to call an instance of that other file I have something like. Also to make the code work I should have the main method like:
import java.util.*;
public class Driver
{

      public static void main (String[] args)
      {
           Scanner in = new Scanner(System.in);
           int number = 3;
           int userChoice = 0;
           GameRunner roul = new GameRunner ();
       }
}

Then my other file has something like:
import java.util.*;
class GameRunner
{   
     public static void roul(Scanner in, int number, int userChoice)
     { 

Guessing this is still wrong because the driver class should only have :
  GameRunner roul = new GameRunner ();

I know it's kinda hard to explain what I'm asking. I hope someone understands.
Thanks.

A:

public class Driver {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int number = 3;
        int userChoice = 0;
        GameRunner runner = new GameRunner ();

        // The following line will invoke the target method of your game runner instance.
        runner.roul(in, number, userChoice);
    }
}

