Activity Stream
48,167 MEMBERS
61075 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 2 of 2
  1.     
    #1
    Banned
    Website's:
    jagmit.com ermm-what.net

    Default Java Issue

    I am new, and also i am a java programmer, well i wanna become a good one and learning. (student).....

    Code: 
    import javax.swing.JOptionPane;
    public class GetUserInput
    {
        public static void main(String[] args)
        {
            String input;
            boolean done = false;
            while (!done)
            {
                input = JOptionPane.showInputDialog("Enter some input (or Cancel to finish):");
                if (input == null)
                {
                    done = true;
                }
                else
                {
                    JOptionPane.showMessageDialog(null, "You entered " + input);
                }
            }
        }
    }
    Write a program called GetUserInput.java that allows the user to enter the prices of several items they have bought and then tells them the total amount. The user can enter the prices for as many items as they want, until they click Cancel. The program should then output the total amount they spent, in a message dialog box. Use pounds for all the amounts.



    I have really been trying really hard to understand but its just not working!!!!!!!!!!!!!!

    Please help me
    allmighty581772 Reviewed by allmighty581772 on . Java Issue I am new, and also i am a java programmer, well i wanna become a good one and learning. (student)..... import javax.swing.JOptionPane; public class GetUserInput { public static void main(String args) { String input; boolean done = false; while (!done) Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    jagmit.com ermm-what.net
    This coding was given by the teacher and told me to change the coding...i know that in between the ELSE statement, the code goes there and the JOptionPane for displaying the total should go outside the ELSE statement.

    I also know that i need to make a new variable to store the amount of data such...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Java stinks: Turn off your Java browser plugin
    By Loget in forum General Discussion
    Replies: 37
    Last Post: 5th Sep 2012, 07:40 AM
  2. Interesting For Java Course
    By CrOwN. in forum General Discussion
    Replies: 6
    Last Post: 15th May 2012, 10:55 AM
  3. [Dedicated] Java Hosting
    By joerudy1988 in forum Archive
    Replies: 1
    Last Post: 27th Feb 2012, 08:08 AM
  4. Need help in JAVA
    By digimon in forum Web Development Area
    Replies: 10
    Last Post: 20th Jan 2012, 04:53 AM
  5. please help me in java
    By shanshayan in forum Webmaster Discussion
    Replies: 2
    Last Post: 10th Jan 2012, 06:48 AM

Tags for this Thread

BE SOCIAL