I've been playing around with it and seems to work fine. I have never written more than one class before but it was pretty straight forward.
I saved this as MyClass.java and compiled it into...
Type: Posts; User: J05HYYY
I've been playing around with it and seems to work fine. I have never written more than one class before but it was pretty straight forward.
I saved this as MyClass.java and compiled it into...
Hmm these POJO's seem complicated. I'm not so good with OOP as it is. Could I request some code on how to do this, or is that asking a little too much? ^:)^
[Maybe I would be better asking about...
Okay, say I have the code below ...
randomMethod can change instance variables "count" and "randomstr". Which is what I'm after.
But my problem is that because they are instance variables, all...
Yeah, I tested the code. Also, it's example 3.1 from here.
With instance variables, all requests share one variable whereas with local variables it's on a per-thread basis... but what if I want my...
Hello, I have a program I want to convert into a servlet. When I use an instance variable; "count" in this case, it is one variable for many users and it does not reset to 0 each time the servlet is...
No, you didn't miss something...
ArrayList<String> valuesDuo = new ArrayList<String>(values);
Means, I think that it creates a new instance so it doesn't change the original. Anywhoo I tested...
Okay, I have tested the code I gave earlier and found that it works ie. it doesn't change the original ArrayList.
ArrayList<Integer> vlinefreq = new ArrayList<Integer>();
ArrayList<Integer>...
Interesting. Maybe the code I just gave didn't work. I have just tried something only slightly more complex and it didn't work:
ArrayList<Integer> vtemplinenum = new ArrayList<Integer>();...
Yeah, in that case I need a deep copy.
Meh, no need to use clone but still a pain to cycle through every element.
vlinefreq.clear();
int x;
for (x=0; x < vfrequency.get(s).size(); x++)
{
One more last thing :P ... how do I copy an ArrayList? I tried this:
vlinefreq = vfrequency.get(s);
but it doesn't seem to work as I imagined it to.
Thanks...
So is "(!foundResponse)" the same as "(foundResopnse == false)"?
Hello, I am getting this error with my code "error: This method must return a result of type int" haven't a clue why it's happening.
int processresponse(String response){
int a;
Boolean...
Cheers - answered my questions exactly.
Thank you. This is what I needed. :)
... one last thing, how would I go about reassigning a new value to an existing element?
Hello,
I am new to java, these forums and know very little about object orientated programming.
I am trying to convert a C++ program to java which uses 2 dimentional vectors.
Searching google I...