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: Calculator

  1. #1
    Junior Member
    Join Date
    Apr 2022
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Calculator

    Hello everyone, I have a question about the console calculator.

    The assignment will look like this:

    assign characters that will represent MR M+ M- and inform the user about it
    the number should also be available after turning off (next turning on) the calculator

    I need help writing a number to a file and reading it from a file, what should I use for this?
    If possible, example code)))
    Last edited by amnez1ya; April 18th, 2022 at 04:16 PM.

  2. #2
    Member
    Join Date
    Apr 2022
    Posts
    36
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Calculator

    You can create a class that read/write a file.
    To write in a file you can use FileWriter.
    To read text from a file you can use Scanner.

Similar Threads

  1. MVC Calculator:
    By jocdrew21 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 30th, 2014, 12:26 PM
  2. help me please this is a calculator by the way
    By ryry163 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 8th, 2014, 05:02 PM
  3. Calculator
    By Andrew Wilson in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 2nd, 2011, 08:08 AM
  4. Calculator
    By javapenguin in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 22nd, 2010, 09:00 AM
  5. Calculator help.
    By Skinnyskinny in forum Java Theory & Questions
    Replies: 6
    Last Post: August 1st, 2009, 12:34 PM