Hi! thanks for answering!
I'm SO sorry!!!!!!! my bad!!! I wrote ProgrammerS instead of Programmer now the code works fine without any error!! thanks so much!!! both of you
Type: Posts; User: juanp_1982
Hi! thanks for answering!
I'm SO sorry!!!!!!! my bad!!! I wrote ProgrammerS instead of Programmer now the code works fine without any error!! thanks so much!!! both of you
hi there!
How do i do that??? because If I type what you wrote I get a syntax error
Hi Every body!
I'm trying to store (momently) each element of a ArrayList in a Programmer object variable to use one of its method, but I'm getting and and error and a warning I don't know neither...
I just learned Java doesn't like 0.00, so it change it to 0.0 so the method works just fine
ok, thanks very much for trying! :-)
it is strange, because I get more desirable results this is the code that I'm using right now
public double formatMoney(double money) {
double money_formatted = 0.00;
if...
I used FLOOR, CEILING, UP, DOWN, HALF_UP, HALF_DOWN and all gave me the same result
well, I couldn't (or at least I haven't learn) use scale() method, instead I use setscale() method
public double formatMoney(double money) {
double money_formatted = 0.00;
...
I don't see any other method that can help me :-( , I'm using this site
round() returns this 1.5E+3.
I think the error is in this line
MathContext format = new MathContext(2, RoundingMode.HALF_UP);
how should I set it? in order to get 1452.79 (only two...
it compiles and runs, but doesn't behave I would like to.
the output that I'm getting is 1500.0 when I introduce 1452.78965412 and I want to get 1452.79,
what am I doing wrong?
I just checked it, it returns a BigDecimal object,
should this work?(I added another BigDecimal object called formatted_2)
public double formatMoney(double money) {
double...
I thought the round method modify "this" BigDecimal object, but I'm not sure if I'm doing it correctly, do you know how I should do it????
Hi Every body!!
I'm learning java this semester, I have a C/C++ background so sometimes things get a litter bit confusing in here, hopefully I learn the very basis soon :-)
I'm working with...