Jonathan Caldwell wrote:
how is it possible to get different results from add to list and println?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Maybe, but you have got a machine which takes you literally.Jonathan Caldwell wrote:ahh Semantics...
. . .
You’re welcomeJonathan Caldwell wrote:Thanks
In that case you were mistaken to believe the suggestion to make it static. A static member belongs to the class, not the object. I suspect you want all those Lists to belong to an object, in which case they can’t be static. And the methods which use those Lists ought not to be static either. Only make things static when you have a good reason.I have whats marked static as static because eclipse suggested it.
I have no better reason.
I am sorry about that. But that is what the code looks like. You might be able to improve it by giving the Lists decent names. Eclipse will do that nicely. It is something to do with highlighting and ctrl-2 R. It will find all the instances of that name and you can give it a sensible name.
I feel discouraged that you say I have to go back to the drawing board...because I have the result I need.
why is that your immediate answer?
Depends how much time you have got and how many marks you want.I am adding to the list inside the loop....adding every user permission for every user
where SUserLoop is the variable that holds each line of permissions as a string.
If I put println(SUserLoop) in the same place I am putting add(SUserLoop)
the output is exactly as I want it.
the loops are complicated.
I might be over complicating but I am taking a huge messy source data (that's how it comes to me)
and I am parsing it down to get specific user info.
The process is something like
1 Get all User info
2 separate into list of user names
3 and list of info per user
get rid of everything else
4 number each element in the user info list so it will correspond to the list of username list index
then when a user is selected their permissions can be compared to another selected user.
...
I am almost to the middle of the project.
you think I should start over?
This will take every ounce of my mental strength! All for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|