EX 6.10. Write a code fragment that determines whether the last character of the String object
called text is character „n’ or not.
EX 6.11. Write a code fragment that prints the characters stored in a String object called str
backwards.
EX 6.12. Write a code fragment that prints every other character in a String object called word
starting with the first character.
EX 6.13. Write a method called multiplesOfFive that prints the first 5 multiples of 5 (starting
with 5). The method takes no parameters and doesn‟t return anything.
}
EX 6.14. Write a method called alarm that prints the string “Alarm!” multiple times on separate
lines. The method should accept an integer parameter that specifies how many times the
string is printed. Print an error message if the parameter is less than 1.
EX 6.15. Write a method called average25 that returns the average of the integers from 1 to 25,
inclusive.