0

I have problem running the following code, it says Error: Could not find or load main class but i clearly have a main in the code...

    package abc;

import java.io.IOException;
import javax.swing.JOptionPane;

// As its name implies, this is what is driving the program, asking for input, giving output, etc.
public class driver
{
    @SuppressWarnings("unused")
    public static void main(String args[]) throws IOException // a main that throws an exception... hmmm... yes it's odd, but apparently not illegal
    {
        ....}

    private static void processTransaction(String trans, Customer[] customers) throws IOException // this is the function that processes the given transaction
    {
        ...
}

// An object representing a person who may have one or more bank accounts
class Customer
{
    ...
}

class BankAccount 
{
    ...
}

class CheckingAccount extends BankAccount // extends BankAccount with added functionality
{
    ...
}

class SavingsAccount extends BankAccount // extends BankAccount with added functionality
{
    ...
}
user133466
  • 3,391
  • 18
  • 63
  • 92

1 Answers1

6

Try giving your class access specifier to public

public class driver
saum22
  • 884
  • 12
  • 28