Concatenate Characters
Given an array of Strings, write a program to take the last character of each
string and make a new String by concatenating it.
Include a class UserMainCode with a static method �concatCharacter� that accepts a
String array as input and returns the new String.
Create a class Main which would get the String array as input and call the static
method concatCharacterpresent in the UserMainCode.
Input and Output Format:
The first line of the input consists of an integer n that corresponds to the number
of strings in the input string array.
The next n lines of the input consist of the strings in the input string array.
Output consists of a string.
Sample Input:
3
ab
a
abcd
Sample Output:
Bad
2. Count Vowels
Given a string input, write a program to find the total number of vowels in the
given string.
Include a class UserMainCode with a static method �countVowels� that accepts a
String argument and returns an int that corresponds to the total number of vowels
in the given string.
Create a class Main which would get the String as input and call the static method
countVowels present in the UserMainCode.
Input and Output Format:
Input consists of a string.
Output consists of an integer..
Sample Input:
avinash
Sample Output:
3