We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Java calculator

greenhal asked
Medium Priority
Last Modified: 2013-12-29
hi I was wondering if somebody could givew me a few pointers as to how a i could implements a calculator in java
I have to be able to take in some data in file format
a b
1 2
3 2
1 6
and processes it by the application of functions as chosen by the user from a button panel.
Watch Question

Top Expert 2016
First you need to read the file and parse out the operands

See http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html

and String.split

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks could you help me with this though its
just i need a way to do this
so for example the user chooses the following (1) ( sin a)  ( cos a) and then this is applied so that
b = B1(1) + B2(sin a) + B3(cos a) where i have to solve for B1 B2 B3 so its a system of matrix equataions could you help me with logic of how to do this?
Top Expert 2016
Sounds like you might need  something more elaborate. Check out the Jep expression parser e.g
Elaborate more, what are B!,B2 & B3.
Can you post whole problem statment
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.