Question: In JAVA please code: Problem 1-Fix code Submit a working program called: Fluffy.java Fix the following code so that the program runs. The comments (in
Problem 1-Fix code Submit a working program called: Fluffy.java Fix the following code so that the program runs. The comments (in red) tell you what the code should be doing import java.util.Scanner; public class Fluffy public static void main(Stringl] args) String s-"The big fluffy dog likes kibbles and bits" //turn the String s into an array of words char splitS s.split(""): //check if the last word in splitS is bits (boolean value will be true if the last word is bits) boolean check splitS.length()-1.equals("bits"); //check length of splitS array int len-splits.length(): //print out variable len System.out.println("Length: %c"+len+); //output the third word in the splitS array (should be fluffy) System.out.println(s[3]) //print out the array splits for (int i-0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
