JAVA · ОСНОВЫ · LESSON 12
row of numbers
int array[edit] · about 14 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Type an example manually. Check the signs and brackets.
public class Main {
public static void main(String[] args) {
int[] scores = {3, 5, 7};
System.out.println(scores.length);
}
}Open the editor for class workSolve it yourself
Create an int[] array called numbers with 2, 4, 6, 8. Print its length using length.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework