error message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loco2
    New Member
    • Mar 2008
    • 1

    error message

    Hello I am very new to programming and I am have some trouble with the class. I get the error message on line 14 cannot find symbol constructor java.lang.Strin g. I am lost and don't what to do.

    import java.util.Scann er;

    public class Prog7a
    {

    // main method
    public static void main (String args [])
    {
    int Month, Day, Year;
    Scanner input = new Scanner (System.in); //input from user

    14. Prog7 Time = new Prog7( "mm","dd","yyyy " );
    //assign object to gradebook


    Time.displayDat e();//displays message
    System.out.prin tln("Enter the Month: ");
    Month = input.nextInt() ;// read
    Time.setMonth (Month);//stores the year

    System.out.prin tln ("Please enter the day: ");
  • sukatoa
    Contributor
    • Nov 2007
    • 539

    #2
    Originally posted by loco2
    Hello I am very new to programming and I am have some trouble with the class. I get the error message on line 14 cannot find symbol constructor java.lang.Strin g. I am lost and don't what to do.

    import java.util.Scann er;

    public class Prog7a
    {

    // main method
    public static void main (String args [])
    {
    int Month, Day, Year;
    Scanner input = new Scanner (System.in); //input from user

    14. Prog7 Time = new Prog7( "mm","dd","yyyy " );
    //assign object to gradebook


    Time.displayDat e();//displays message
    System.out.prin tln("Enter the Month: ");
    Month = input.nextInt() ;// read
    Time.setMonth (Month);//stores the year

    System.out.prin tln ("Please enter the day: ");
    Where is the Prog7 Constructor? Can you post the complete code and show them in tags?

    Have time to read this.

    I hope it helps,
    Sukatoa ;-)

    Comment

    Working...