@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> can anyone here explain what SPRING framework is in java?
<1> rentonph: not i.
<2> try the spring website?
<0> will do
<2> its just one of the gazillion frameworks out there
<0> is a framework a set of libraries?
<3> james_mil
<3> code is wrong
<2> more or less
<1> james_mil: actually, i don't understand the problem you have. it seems your code does not compare to what you describe. perhaps create a test case.
<2> wikipedia mostly has good explanations of keywords
<3> prices.intValue()
<3> always returns int
<3> and ur if condition
<3> will always be false
<3> so the else part will always execute



<3> and u will get the original number
<3> :) sorry
<1> :)
<1> james_mil: What is a test case? Why would you write one? See http://javafaq.mine.nu/lookup?22 (to show what you are *really* doing) Paste test case and any error messages to http://papernapkin.org/pastebin or another pastebin
<3> hope he understood :(
<4> hey..sorry..my phone rang
<4> hmm right ok
<3> :)
<4> KingKong^: so how can I change it round..its confusin
<4> double() doesnt have any method similar to endsWith(0
<4> endsWith()
<3> instead of intvalue
<3> cmon james_mil
<3> its simple, i am too sleepy to think about it now :(
<4> doubleValue
<3> yeah something like that
<4> hmmmm
<2> time to file an objection
<2> this channel belongs to the ppl from java
<5> :P
<2> I wonder how cservice will treat an objection
<0> i thought java was open source etc...?
<2> it is
<6> Always has been (from a certain point of view).
<2> I don't care for it being opensource
<2> its sometimes easy to check the source to understand what is going on
<2> but i'm not going to alter the sourcecode myself
<6> indeed. And the sources have always been available. Oh well :)
<2> but some people think differently
<4> KingKong^: I changed the intValue() to doubleValue() but i still cant get it to work, i now got a NumberFormat exception at this line: int pricesOne = Integer.parseInt(priceIntVal);
<3> try casting to long
<3> or int
<4> nope didnt work :(
<3> int pricesOne = (int) prices
<3> textArea.append( (int) prices + "\n");
<4> inconvertable types
<6> KingKong^: that makes no sense at all.. How the heck would you cast a string to an int?
<3> oh man my basics ****s
<3> no
<3> prices is double
<6> yes. What do you think "" is ?
<4> hmmm
<6> "stuff" denotes a String literal. After our "discussion" earlier on I'm surprised you forgot all of a sudden.
<3> huh?, i dont see it in prices
<3> i still dont get it, prices is a double isnt it
<4> yea, prices is an ArrayList which stores Double values
<6> if you wish to append a string to a textarea you'd first try to utilize the toString() method which is supported by almost every object.
<6> And you can't cast an ArrayList like that.
<6> you /might/ be able to cast one of its elements though </hint>
<3> nope, thats hidden with : Double prices = (Double)iterator.next();
<6> that too makes little sense.
<4> does it?
<6> ofcourse
<6> Why create a new variable every time the loop runs?
<6> s/create/define/
<3> yes , but coming to your earlier point , prices is a double is it not?
<4> Lion-O: then how should I declare that
<6> KingKong^: Its defined as such. I'm not too sure about its contents. This code looks icky.
<6> james_mil: As the Java tutorials tell you to.



<3> yes its bad, but i cant a double be explicitly cast to int.. i am sure its not arraylist in the loop
<6> public static void main(String[] args) { Double myVar; <loop> .... myVar = .....; ..... } ... etc, etc.
<6> KingKong^: I'm not too sure.
<6> on line 11 he's using "prices.iterator()" on line 13 he's re-defining prices again. errrr....
<3> yeah
<3> thats waht i was saying, so prices is double in the loop and i am sure we can cast a double to int, then why incompatible types exception? :(
<6> KingKong^: could be anything. This code is a mess.
<4> mmmmmmmmm
<4> Edited line 11: Double pp = (Double)iterator.next();
<6> ArrayList<Double> prices = new ArrayList<Double>(); for (Double price : prices) { System.out.println(price.toString()); } To give but a quick hint.
<4> whats this.. for (Double price : prices)
<6> james_mil: an enhanced for loop.
<2> its a foreach
<2> for each price in prices
<4> ermmm
<6> As mentioned in the java tutorials I might add. In the basic elements.
<4> is that in Java 5?
<2> its like for(int i = 0; i < prices.length; i++) { Double price = (Dobule) prices.get(i); }
<6> errr, basic trails that is.
<2> java 5 features yes
<4> ahh i see
<2> but this is easier to write
<3> this is new to me :) , i jus tknow 1.4
<6> also note that Rob_uknow's example there is also a very big hint. /thats/ how you'd best approach your problem too.
<2> 1.5 is ancient already
<6> indeed.. Still, thats another aspect I enjoy about Java. You can be sure Sun will keep it maintained and updated for a while to come.
<2> but for howlong
<3> james_mil: can you just try renaming prices in the loop to something else?
<6> Rob_uknow: true. Still, for now I'm not too anxious to jump on the Mustang :)
<4> thanks Lion-O..
<4> KingKong^: yea ill try it..you think it will work? But ive found another way of doing it aswell..1sec
<4> nope KingKong^ didnt work
<3> can you pm me the whole code you have written
<4> exactly same as last, just the prices renamed to something else
<3> does the exception say incompatible :arraylist to int?
<4> nope..thers no exception..it just displays ALL the values as doubles
<3> :),earlier you said it gave exception when u changed to doublevalue
<4> Yea, it did..dont know why though :p
<3> just pm me the whold method as it stands now
<4> ive got it working with this, i just changed the if statement to this: http://www.pastebin.ca/332193
<3> phew :) cool james_mil much better
<3> gnight
<4> Thanks for ur help guys
<2> that will be 2.50
<4> yep thanks KingKong^ :)
<4> you want paying in Double or Int ? :p
<2> in billion dollars
<4> haha
<2> 2.5 to be exact
<4> ill throw you an exception instead
<2> don't make me catch it
<4> lol
<4> i gotta go
<4> thanks again all of you
<4> laters..
<2> later
<2> tera
<7> you are not a supporter, Rob_uknow ?
<2> no
<2> i'm filing an objection
<8> heheh
<7> Maybe you are Rob_udontknowortrust :D
<9> any particular reason for the objection?
<7> Rob_uknow, please re-consider ! LLyric began his evil ban-laughter !
<2> no valid e-mail address
<7> :D
<2> and cservice is not willing to change it
<2> and the email change form doesn't work
<6> Rob_uknow: well, thats why I asked Revenger to come over here.
<9> so you're objecting because cservice **** goats through straws :)
<6> but it seems you two are never online at the same time ;)
<9> news at 11 :)
<2> Revenger is online now


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

jerdawh
'jingle undernet
#AllNiteCafe
mirrorselect cannot open tty-output
fishys teens
#AllNiteCafe
rustusq
#java
#chatzone
#chatzone



Home  |  disclaimer  |  contact  |  submit quotes