Anonymous asked in Computers & InternetProgramming & Design · 8 years ago

Java Questions... Can anyone Check if I answered correctly?

9. To process all the elements of a two-dimensional array, we use a double loop (True)

10. We can pass a two-dimensional array parameter to a method. (True)

12. When processing all the elements of row i of a two-dimensional array named grades using a for loop with variable j, what is the condition of the for loop? I answered: j < grades[i].length

19. private fields and methods are inherited. (True)

20. private fields and methods are part of the inheriting class object. (True)

2 Answers

  • Anonymous
    8 years ago
    Favorite Answer

    9. You use a nested loop, if that's what you meant by double then yes.

    <outer loop condition>


        <inner loop condition>


        // like this



    10. True.

    12. True.

    19. False *

    20. False *

    * Private fields and private methods are private to a class - period. Protected fields and protected methods are fields and methods that descendant classes can inherit and use, they are considered part of both classes, just like public fields and methods except only descendants can access protected fields and methods whereas anything can access a public field or method.

  • 8 years ago

    9. It's not strictly necessary, but generally speaking, yes.

    10. Absolutely.

    12. That looks right.

    19. Not last I heard.

    20. I'm not sure what this means, is it asking something different from (19)?

Still have questions? Get your answers by asking now.