Gfunk Posted March 12, 2010 Share Posted March 12, 2010 I am trying to make the user input a word such as the first Joption is What is your favourite color. And then i want the word that the user has inputed to print out in the system.out Im a complete newbie and im getting very frustrated as i am stuck at this point. can anyone help? import java.util.*; import comp100.*; import javax.swing.*; import javax.swing.JOptionPane; public void userint (String[] args ) { int color, verb, animal; JOptionPane.showInputDialog ("What is your favourite color?"); color = ????? JOptionPane.showInputDialog ("Insert a verb"); JOptionPane.showInputDialog ("An Animal"); System.out.println ("A coloured " + animal + " was running " ); } public void printStory(){ } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now