小编Con*_*ent的帖子

Pretty sure I'm over complicating my loops but unsure how to simplify

As the title says I just need some help/advice on how I can simplify a part of my code. I get the output I want but it's obvious to see that the way I go about it is a bit excessive. What I'm trying to do in my program is pass the array

int [] myInches = {89,12,33,7,72,42,76,49,69,85,61,23};
Run Code Online (Sandbox Code Playgroud)

Into my buildFeetArray method which just takes the array elements, divides them by 12 to get a new element value which is …

java for-loop

13
推荐指数
4
解决办法
2289
查看次数

标签 统计

for-loop ×1

java ×1