Do you have a design for what you are trying to do. You've been fussing with ways to code this and that and I'm not sure what it is you are trying to do.
Perhaps arrays are not the right container...
Type: Posts; User: Norm
Do you have a design for what you are trying to do. You've been fussing with ways to code this and that and I'm not sure what it is you are trying to do.
Perhaps arrays are not the right container...
Two ways you could do that
Have an empty statement for the true case of the if and do the stuff you want done in the else clause.
if (the match) {
// do nothing
}else {
store pkt
call...
I'll help you get your code working. Post what you have and we'll work on it.
Does that mean the method is never run or that the method is run more than once?
Your posted code does not show any method.
There are two arrays. Can either of them have null entries? Or do you always put something into one or both of them? I can't see your code so I don't know what you have. The code in post#8 filled...
if ( nodeobj[0].datalist[0] == null)
can nodeobj[0] be null here?
Do you know about getters and setters? If a method in class b needs to access data in another class, it callsa method in that class.
Can you post the code showing where it won't let you do...
Sorry, I don't see any definition for class b.
nodeobj[0].datalist[0] is type c
How is class b related to this?
If you do this in a's constructor: datalist[0]=new c(88);
then all instances of an a object will have a c object created with 88. Don't hard code 88 in the constructor. Use a variable if you want...
Isn't that done in the a class? Each a object gets its own datalist variable.
Could you comment the code with what you are trying to do? Having to scroll up to read your comments and then scroll...
If each element in the nodeobj array is a different object, then its contents can be unique to that object.
Sorry, I don't see your problem yet.
Write a small simple program that executes to...
Sorry, still do not understand your problem. Your too short pieces of code leave stuff out.
I see an array: nodeobj of type ??? that has a member: datalist that is an array of type c.
c has a...
Please explain what you want to do. Your posted "examples" don't have any meaning for me.