Write a function in Java that uses recursion (no loops) to check if the String str
has any char a
. Return true
if it does and false
if it...
Search Results
Searching for: char
Individual Exercises
You have been handed a mysterious piece of data by an unknown person. Judging by his shifty eyes and maniacal laughter you don't think he...
Given a class Answer<E>
, write a method that converts argument e
into String and returns that value. If the value is a primitve, (...
What datatype should you use to store a Middle initial?
Complete the following binary search method on characters. Find the character search
in the array letters
. Return the index of the...
Given a string, return a string where for every char in the original, there are two chars.
Returns true if for every '*' (star) in the string, if there are chars both immediately before and after the star, they are the same.
For function countChr()
write the missing part of the recursive call. This function should return the number of times that the letter "A"...
Given a String str
and a character ch
, return the number of times ch
appears in str
. For example, if str
is "Hello" and ch
is 'l', the...
Write a function called makeExcited
that receives a char
and permanently changes the value of it so that it becomes an exclamation mark (...
Complete the while loop so that the variable repetition
keeps track of how many times the first character in word
is repeated in a row at...
Write a method that will return a string composed of the last n
characters of wholeString
.
For example:
- Running
getSuffix("reading", 3)
...
Say that a "character clump" in a string is a series of 2 or more adjacent copies of the same character. Return the number of character...