Question: Need help ASAP! /** * This method returns a substring of the given input string that is enclosed in two * given characters. * @param
Need help ASAP!
/**
* This method returns a substring of the given input string that is enclosed in two
* given characters.
* @param str is a string that contains at least two characters including open and close
* @param open is a character at the beginning of the string that should be returned.
* @param close is a character at the end of the string that should be returned.
* @return returns a string enclosed in two given characters of open and close .
* @pre The given str contains only one open and one close character.
*/
public static String getSubstring(String str, char open, char close) {
//Insert your code here and change the return statement to fit your implementation.
return "";
}
/**
* This method converts a decimal value into its binary representation.
* @param value is a positive integer number
* @return the binary representation of the input.
* @pre the input is a positive integer number.
*/
public static String decimalToBinary(int value) {
//Insert your code here and change the return statement to fit your implementation.
return "";
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
