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 length of the string 'Hello World'?
Count the characters including the space.
What will str.charAt(1) return for str = 'Hello'?
Remember indexing starts at 0.
What method returns the number of characters in a string?
Think about the method commonly used for counting.
Is the comparison between 'dog' and 'Dog' equal in Java?
Consider how Java treats string cases.
Given a string str = 'Java String Handling', write a method to return the last three characters of the string.
Calculate the starting index based on the length.
How would you check if a string str contains the word 'Java' regardless of case sensitivity?
Convert both to the same case before checking.
5 more questions in this section. Enroll free to practise them all.
Enroll free