473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

my java application works only with full numbers, does not accepts decimal currency.

1
i coded a java application, the formula, and the calculations work when i use full numbers, but if i test it with decimal numbers, it does not work. i used Integer.parseInt(). what do i need to do? my assignment is required to work with 2 decimals points.

System.out.print("write the total amount of your deposits");
deposits = dataIn.readLine();
own =Integer.parseInt(deposits);
May 3 '11 #1
1 2013

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: nicolas.riesch | last post by:
I am trying to use strxfm with unicode strings, but it does not work. This is what I did: >>> import locale >>> s=u'\u00e9' >>> print s é >>> locale.setlocale(locale.LC_ALL, '')...
0
by: John Hicks | last post by:
Is there an accepted best practice on whether to store decimal currency amounts (e.g. dollars and cents) in MySQL decimal column types? Certainly, the most straightforward way is to use decimal...
4
by: Bob Bryan | last post by:
I am using a select statement to obtain a result set back with aggregated data. The problem is that I am seeing column data with 11 to 13 digits after the decimal point. I tried using the STR...
1
by: Lionel Schiepers | last post by:
In the code below (called from an ASPX page), does someone known why a 'System.DllNotFoundException' exception is throw when the thread created by 'cppextension::MyExtension::Test()' starts to...
2
by: Christoffer | last post by:
Hi, I have a quick question. Why do I get a 403 Forbidden message when calling a Web Service from an ASP.NET web application but not from Windows Application (it works perfectly from the Windows...
17
by: scan87 | last post by:
Can somone please, please give me the solution for the following problem. I need to submit it on Monday. Write a global function called format, which formats numbers with a given number of decimal...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
Hi there. I posted an earlier issue under the name "That assembly does not allow partially trusted callers" but have now identified what the issue is. As explained before I am working in...
4
by: Michel Rouzic | last post by:
I made a program that accepts as parameters an input file name that we'll call file1, and an output file name that we'll call file2, and opens on its own a configuration file called file3. My...
0
by: pjbr34 | last post by:
Hi all, The problem is this: Oracle table with NUMBER datatype is migrated into DB2 as DECIMAL. No problem. BUT The Java application that processes the data using Eclipse or WebLogic is...
0
by: Mattias | last post by:
I was trying to run the pet catalog sample application which comes with Netbeans IDE 6.9.1 by the time I run it I get the following error message HTTP Status 500 - type Exception report ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.