Attempting the FizzBuzz problem, however I encounter the issue "charAt cannot be dereferenced". Here is my code below for reference.
public String fizzString(String str) {
if ((str.charAt(0).equals('f'))&&(str.charAt((str.length)-1).equals('b'))){
return "FizzBuzz";
}
else if (str.charAt(0).equals('f')){
return "Fizz";
}
else if (str.charAt((str.length)-1).equals('b')){
return "Buzz";
}
else{
return "FizzBuzz";
}
}