Students, please be sure to log in. This site does not use cookies and does not track/store work submitted when not signed in.
Unit 6 Problems
Java Reference Sheet
getLength
Objective(s): Practice using the length property of an array.
Given an arraynums
, complete the code to get the length of the array.
Remember that for arrays, length
is a property that is different from Strings
. With String
objects, you are using a method which means you have a set of parenthesis. With arrays, you do not because it is a property and NOT a method. Anytime you use a method you have parenthesis involved. There is no length method for arrays.