Write a function in Java that implements the following logic: Given a string str
and a non-empty word
, return a version of the original...
CodeWorkout - X31-X40 - a smattering of exercises for discussion
Score: 0 / 10.0
Exercises
Write a function in Java that implements the following logic: Given two strings, a
and b
, create a bigger string made of the first...
Given a string str
, find all places where a three-letter combination starting with "z" and ending with "p" occurs. Return a string where...
Write a function in Java that implements the following logic: Given a string str
and a non-empty word
, return a string made of each...
Write a function in Java that counts the number of times the string "code" appears anywhere in the given string str
, except that we'll...
Given two strings, return true if either of the strings appears at the very end of the other string, ignoring upper/lower case...
Write a function in Java that returns true if the given string str
contains an occurrence of the substring "xyz" where "xyz" is not...
We'll say that a string is xy-balanced if for all the 'x' characterss in the string, there exists a 'y' character somewhere later in the...
A sandwich is two pieces of bread with something in between. Write a Java method that takes in a string str
and returns the string that...
Given an array containing three ints, return the sum of all the elements. It is safe to assume that the array always has at least 3...