Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: What's Wrong With My Code?

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Thanked 0 Times in 0 Posts

    Default What's Wrong With My Code?

    package Assignments1;

    public class project
    public static void main(String[]args)
    While (we have money left to spend and (itemNumber <=max number of items))
    Display amount of money left and number of items that can be bought.
    Read cost of proposed purchase if(we can afford the purchase)
    Display a message.
    totalSpent = totalspent + cost of item
    update amountRemaining
    if(amountRemaining >0);
    Display amount of money left.
    Display a message (no more money).
    Make this the last loop interation


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: What's Wrong With My Code?

    Quote Originally Posted by markchua View Post
    What's Wrong With My Code?
    It looks like you forgot to write it. Please include your question and the full text of any error messages you may get.

Similar Threads

  1. Please what is wrong with my code
    By LordDavid in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 28th, 2012, 09:08 PM
  2. What is the wrong with this code?
    By Subhasri in forum AWT / Java Swing
    Replies: 1
    Last Post: September 29th, 2011, 08:14 AM
  3. What is wrong with this code?
    By A19 in forum What's Wrong With My Code?
    Replies: 15
    Last Post: August 11th, 2011, 09:45 PM
  4. want wrong with my code
    By drum in forum Member Introductions
    Replies: 1
    Last Post: May 20th, 2011, 09:06 AM
  5. What's wrong with my code ?
    By mithani in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 5th, 2010, 08:57 AM