I need help with my java program?

I need help with my java program?
import java.util.Scanner;
import java.io.*;
public class Driver
{
public static void main(String[] args)
{
Scanner scanme = new Scanner(System.in);
System.out.print(“First name:”);
String first = scanme.nextLine();
System.out.print(“Last name:”);
String last = scanme.nextLine();
System.out.print(“Job title:”);
String job = scanme.nextLine();

Driver medium = new Driver(first, last, job);
Driver low = new Driver();

String a, b;
a = medium.createLetter();

b = low.createLetter();

}

}

It keeps giving me this error saying that “cannot find symbol – constructor Driver(java.lang.string…..)

Best answer:

You’re trying to create an instance of “Driver” in the class of “Driver” and you do not have a constructor method to actually create an instance of a “Driver”.

Tags: , , ,

Under Forum

1 Comment for I need help with my java program?

  • 1. grease  |  October 10th, 2007 at 5:01 pm

    a few problems.

    you need to add a function/constructor

    Driver(String First, String last, String job )
    {
    }

    and a function

    public String createLetter()
    {
    }

Leave a Comment for I need help with my java program?

Required

Required, hidden

Trackback this post  |  Subscribe to the comments via RSS Feed


Forum