Skip to content
Advertisement

Tag: arrays

How to return arraylist vertically

I am trying to return an array list vertically but I’m having some issues trying to implement it. Below is my code, and the return results; Output is what I’m trying to get to be vertically } My current output is [2, 4, -1] I’d like it to be Any help would be appreciated. Thank you in advance Answer Hi

Why is this image method returning a black image?

I am running the code below. What it is supposed to do is equalize an image passed into it. All the methods and variables run fine except for newPixelVal which is always zero. This then makes my image all black. I cannot figure out why this is returning 0. Answer Got it! The division carried out at newPixelVal is between

voting program not working if theres a tie [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago. Improve this question this is my array voting program. it works as i wanted but now i need to add new feature to

Why isn’t my Array updating outside of the method that it is set in after I assign it a new value?

I have an issue where when I combine two arrays ‘laptops’ and ‘arr2’ in the addLaptop() method and create a third array ‘newArray’ to contain the values of ‘laptops’ and ‘arr2’ then set the ‘laptops’ array equal to the value of ‘newArray’ and print ‘laptops’ within my addLaptop() method the value of ‘laptops’ will be equal ‘newArray’ just like I

Advertisement