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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 2 of 2

Thread: Savings account balance comparison code.

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Reading values from main file

    I have a savings account assignment which includes the following step:
    a public method of the appropriate type called equals which will compare two accounts and return true if both savingsBalance values are the same - accurate to 4 digits after the decimal point.

    I have it working with a boolean method in the main file, but was wondering if there is a way for a method in the program file to get the values from the main file so that the boolean method can be in the program file with the rest of my methods.
    Last edited by Rhyssa6; April 10th, 2011 at 04:49 PM.


  2. #2
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: Savings account balance comparison code.

    Add semi-colon to the end of:
    String acctTwo = acct2.currentBalance()
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

Similar Threads

  1. How to set initial balance of savings account?
    By Punky0214 in forum Java Theory & Questions
    Replies: 0
    Last Post: November 17th, 2010, 10:00 PM
  2. table comparison
    By awecode in forum JDBC & Databases
    Replies: 2
    Last Post: October 12th, 2010, 09:37 AM
  3. Need help with array comparison
    By raidcomputer in forum Collections and Generics
    Replies: 4
    Last Post: November 17th, 2009, 01:55 PM
  4. savings and loan society
    By 5723 in forum Java Theory & Questions
    Replies: 9
    Last Post: November 14th, 2009, 12:01 AM
  5. Array comparison
    By subhvi in forum Collections and Generics
    Replies: 5
    Last Post: September 3rd, 2009, 03:56 AM