| |
| |
| |
|
Page: 1 2 3 4
Comments:
<0> i tried explaingint them thats all easy read what they want :( <0> not rocket science <0> o well thanks Deano :) <1> np, keep at it <0> hehe yeah studing collections now <0> they seem to love it <0> all i have ever used is hash map practically <0> hashmap* <1> indeed they do <0> :) <1> even after some years of J2EE experience, my interviews always seem to consist of core Java, especially stuff like Collections etc <0> hehe, she asked me about session management <0> i told her first preference is to depend on cookies then url rewriting <0> she said no cookies are not used for this <0> she wouldnt listen to me! <0> it ****ed
<1> you might want to search for session management on whatever application servers u use <1> e.g. tomcat: http://www.jguru.com/faq/view.jsp?EID=289114 <0> isnt it supposed to be server independent , atleast for the programmer <0> any session dependant code i write should work on all containers <0> no? <1> well they generally use HttpSession etc which isn't container specific <0> aha <0> and for first time user, the server both urlrewrites and sends a cookie with jsessionid <1> I'm not sure what implementation she was thinking of <1> anyway, bbiab <2> Why does this not work...? int foo = Integer.parseInt( arrayList.get(indexValue) ); <3> james_mil - whats the error message you are getting? <2> cannont resolve symbol - method parseInt (java.lang.Object) <2> *cannot <3> thats because ArrayList.get returns an object <2> So can I not convert the object to an Int? <3> what type of objects does the ArrayList hold? <4> it should be String <3> ok <3> so cast the result of the get to String <4> parseInt(String s) <3> int foo = Integer.parseInt((String)arrayList.get(indexValue)); <2> Well when im adding elements to the ArrayList, im using arrayList.add(new Integer(number)); <2> hmmmm <3> oh <3> so it holds integer? <2> yea <3> all you need to do is cast it to integer <2> How? <3> int foo = (Integer)arrayList.get(indexValue)) <2> oh yes i see <4> no <4> int foo is primitive <3> demig0d - so? java has auto (un)boxing <4> ((Integer)arrayList.get(indexValue))).intValue(); <4> oh, i'm still using 1.4 hehehe <3> oh, have fun then :) <2> MbGone that didnt work.. got this error message: incompatible types - found java.lang.Integer but expected int <3> james_mil - which jdk are you using? <3> 1.4 ? <2> I think so..how can I check? <3> java -version <3> anyway, then do what demig0d suggested <2> 1.5.0_10 <2> hmmm ok <2> thanks <2> MbGone, after ive done that...how would I now convert the int back to an Object so I can store it in the arrayList again via the set method ? <0> wrapper cl***es <0> new Integer(int); <0> i think <2> hmmmm...how would I write that in the statement? <2> ahh i think i got it <0> something like arrlist.put(index, new Integer(yourintvar)); <2> yea <2> thanks <5> hi <3> hi <2> is it possible to iterate over 2 ArrayList's at the same time? to get data from each one at the same time? <0> i think so <0> why not <2> How ?
<2> how would it be structured, the iterator and the while loop? <6> james_mil: at the same time? No, I don't see that happening. You can nest 2 loops though. <2> hmmmmm <6> still, extended loop has several options. I guess a lot depends on what it is you're trying to do. <3> james_mil - if they both have the same size you can do with one loop <2> hmmm <2> Yea they both have the same size <2> I'll give an example of what I want to do.. <5> the "increase" term in a for loop accepts several increments I think <2> The first arraylist contains a list of all the names of products, and the other arraylist contains the prices for each of those products, and the product name and corresponding price are both stored in the same index but in a different array.. <2> and basically, I want to display all the names and prices one by one <3> james_mil - so simply use the same index for both of the arrays.. <6> then a simple nested loop should be enough. <0> sorry i got dced <3> although i would suggest using a single ArrayList which holds an object that has both the name and the price of the product <2> Yes i am using the same index for both arrays <3> so? <2> MbGone: I need to access each price and name individually elsewhere in the program <2> thats why I stored them in seperate arrays <0> you can get them anytime from the single object <3> whats wrong with productList.get(i).getName() / .getPrice() ? <2> MbGone: Yea I am using that <2> because I also have a 3rd array list <2> which stores Product objects <5> funny : http://www.bluej.org/vs/vs-bj.html <2> and that is used to compare with these 2 arrays <2> im confused now <7> All you need is the 1 array containing Product objects. <7> Then Product has getName and getPrice <2> Lion-O: is there any example online showing the nested loop method <6> james_mil: the java tutorial. its basicly using 2 loops. <2> whats the link? <6> still, I'd recommend against it and use the other suggestions. This looks to me like a design problem. <2> hmmmm <2> ok thanks everyone <8> interesting college ***ignment <8> for which numbers is the number == digit1! + digit2! + ... <6> looks like java support for handheld pc's and such is rather limited. doh. <8> 1 = 1! <8> 2 = 2! <8> 145 = 1! + 4! + 5! <8> 40585 = 4! + 0! + 5! + 8! + 5! <8> that's all for all numbers smaller than 10 billion <8> Lion-O: CLDC ? CDC? <6> hmm... wasn't ! a boolean inversion? interesting. <8> 4 ! = 4 * 3 * 2 * 1 <8> faculty <7> factorial <8> oh <6> aah. gotcha. <8> 0! = 1! = 1 <5> "handheld pcs" means "WinCE" ? <6> wolfey: right now I'm merely looking for a jvm and discovered a few 3rd party ones. Too early for me to tell what it exactly supports. <6> the way it looks now I think I'll simply p*** on the idea for now :) <6> chir: not really. It basicly means just that; iPAQ, Palm, etc. WinCE is merely the operating system, and its perfectly possible to use other OS's on an handheld. <5> palm still exists? <6> no idea. <5> I don't think you can buy a PDA today without WinCE <6> or 'Windows mobile' as they're calling it now 8) <9> whineCE ? <5> so your question should be rephrased: "when will there be a WinCE pda that ships with some java VM pre-installed?". You can answer that yourself <9> :P <5> However, I bet all WinCE pdas and phones ship with a pre-installed "sharp" VM ... Must be a coincidence... <6> chir: huh? You ***ume I asked a question, I didn't. <5> but you said "for now", as if some day WinCE was going to change politically <6> And personally I'd sooner see ms move to implementing a mobile version of .net than actually shipping some java-related virtual machine 8) <6> chir: p*** on the idea to install a (3rd party) jvm on this box. <5> lion: I believed the "sharpME" VM was already shipping <6> Now that they've opened up Java a little more it wouldn't surprise me if it would also boost some of the 3rd party mobile developments. <5> the problem is, what does "mobile" mean? dump phones? <5> dumb <6> nah. More like limited environments. <5> the only hope would be for Jobs to include javaME in his iphone pda <8> chir: smartphones are generally more powerful than pentium 1
Return to
#java or Go to some related
logs:
competition de caricatur cosmick wars issue.net centos 4.2 #MissKitten #linuxhelp #teens #javascript gyukgui #linux #AllNiteCafe
|
|