Refine
All questions
351 resultsWhich prebuilt class, from the java.util package, is commonly used to take user input from the console?
Show answer
Which Scanner method reads the next token from the input stream and returns it as a String?
Show answer
Which static method of the Integer class converts a String to its integer equivalent?
Show answer
Which class (from java.util) provides prebuilt methods like sort() and binarySearch() for manipulating arrays?
Show answer
What must be true about an array BEFORE using Arrays.binarySearch() on it?
Show answer
What does Arrays.binarySearch() return if the key element is NOT found in the array?
Show answer
Which String class method converts all characters of a string to uppercase?
Show answer
For myString = "Hello World", what does myString.charAt(6) return?
Show answer
For myString = "Hello World", what does myString.length() return?
Show answer
Which String method checks if a string contains a given substring, returning true/false?
Show answer
Which String method compares two strings for equality WITHOUT considering case sensitivity?
Show answer
For myString = "Hello World", what does myString.replace('l','*') return?
Show answer
Once the Arrays class has sorted an array, the sort is applied in ascending order by default using Arrays.sort().
Show answer
The Integer class and its parseInt() method must be manually imported using the import statement, similar to the Scanner class.
Show answer
Write the two lines of code needed to create a Scanner object that reads from the console and stores a name entered by the user.
Show answer
Data that has not been processed to reveal useful meaning is called:
Show answer
Write Java code to declare an array of 5 doubles with values {103, 144, 256.5, 346, 387.5}, sort it using the Arrays class, and then print the lowest and highest marks.
Show answer
Which of the following best describes 'Information'?
Show answer
An unexpected error situation during program execution that causes it to terminate abnormally is called:
Show answer
Which of the following is NOT a property of a database?