1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

While Loops - Error Help pls

Discussion in 'Java' started by Zombie_GurL, Nov 9, 2011.

  1. Zombie_GurL

    Zombie_GurL New Member

    Nov 9, 2011
    Likes Received:
    Trophy Points:
    I have been asked to write a program for one of my 1st year modules. im new to programming. Given below is the question. I have answered it partly and there are some errors and its incomplete too. it would be really great if someone could help me to complete it.

    This is the code that Iv written so far. I have no idea how to do beyond this.

    import javax.swing.*; // import the swing library for I/O
    class films
    public static void main (String[] param)
    } // END main
    public static void movies()
    String again = "";
    String film;
    int currentyear=2011;
    String year = "";
    String textinput1;
    int oldest year=9999;
    String textinput3;
    while (!(again.equals("QUIT")))
    film = JOptionPane.showInputDialog("Name a film");
    textinput1 = JOptionPane.showInputDialog
    ("What year was" +film+ "released");
    year = Integer.parseInt(textinput1);
    again = JOptionPane.showInputDialog("Name a film");
    System.out.println("The earliest film was");
    if (current year < year){ // i cant seem to sort out the rest of the if statement
    } // END 
    } // END class 
    Thanks in advance
    Last edited by a moderator: Nov 9, 2011

Share This Page