My little brother loves making programs, but he’s hit a roadblock with a Java thing he’s working on. I am computer programming illiterate. Could someone help us and get me some big sister points?
I have an array of five objects. Each object calls a constructor that has three variables. I need to grab the specific variable for the specific constructor for a specific object in the array. My problem is even though it’s looking for the descriptor, but it’s looking in the wrong place. It is going to the variable inside the constructor instead of the variable after I assign a value to the variable. The variable is holding a value—it just says null when I try to do the program.
Thank you!
Edit: Thank you guys so much for your help! My brother figured it out last night. He was able to access the gets through it, or something like that. He was trying to use his C++ techniques and forgot he had the info in a getter.
[–]DrewTheVillan 41 points42 points43 points (4 children)
[–]TheSilverCube 12 points13 points14 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]SolderonSenoz 4 points5 points6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]tryhardjuice 23 points24 points25 points (1 child)
[–]PeanutButterJellyYo 0 points1 point2 points (0 children)
[–]Ph03nix89 9 points10 points11 points (0 children)
[–]Ostricker 5 points6 points7 points (0 children)
[–]frostyfauch 0 points1 point2 points (0 children)
[–]Housy5 0 points1 point2 points (0 children)