Practice 1
String Exercises
Due Date: Sat 25-2-2017 at 9:00pm
Sign in to Google to save your progress. Learn more
Name: *
ID: *
Section: *
Write the required Java statements to do the following:
All input data are read from a scanner object.
1. Count the number of vowel letters in a given word and display them to the user. E.g. input : hello; output: 2 e o *
2. Check if a given word contains numerical digits and display the number and its square value. E.g. input: student12; output: 12 144 *
3. Check if a given word is Palindrome. E.g. input: lolo ; output: not palindrome; input: maxam; output: palindrome *
For the following piece of code:
String input = "Today is a great day";
int count = 0;
for(int i = 0; i< input.length(); i++)
    if(input.charAt(i) == 'a')
         count+=1;
System.out.println(count);
1. What is the output: *
2. The last index of 'a' is: *
3. The code does the following: *
How do you rate this exercise set
I think this set of problems is *
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.