#I dont understand

11 messages · Page 1 of 1 (latest)

hoary pollen
#
    public static void main(String[] args) {
        byte[] num1 = new byte[]{5, 6, 8};

        int sum1 = sumArray(num1);
        sum1 = sumArray(num1);

    }
    public static int sumArray(byte[] arr) {
        int sum = 0;
        for(byte i = 0; i < arr.length; i++)
            sum += arr [i];

        return sum;
    }
}
acoustic sentinelBOT
#

This post has been reserved for your question.

Hey @hoary pollen! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

acoustic sentinelBOT
tender quarry
flat gust
rotund mica
#

its a warning from intellij to use a different format of the for loop

#

yes

hoary pollen
#

okey

#

thank you

acoustic sentinelBOT
# hoary pollen thank you

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.