Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the syntax to declare an array of integers with size 10?
Look for the type, name, and size in the declaration.
What will int[] arr = {1, 2, 3}; create?
Think about the number of items within the curly braces.
What method do you use to get the length of a string?
It’s an object method specific to a string.
True or False: An array can store different types of data.
Think about the definition of arrays.
Write a method that takes an array of integers and returns the maximum value. Provide a simple testing code to demonstrate how it works.
You'll need a variable to keep track of the maximum value.
Create a program that counts the number of vowels in a given string and prints the count.
Think about how to check if a character is a vowel.
7 more questions in this section. Enroll free to practise them all.
Enroll free