Question: Problem 1(15 points) Write a complete java static method called smallerString that accepts two String parameters and returns the String that is alphabetically first. For
Problem 1(15 points) Write a complete java static method called "smallerString" that accepts two String parameters and returns the String that is alphabetically first. For example: System.out.println( smallerString("mouse". "dog")); // this would output "dog" I and System.out.println( smallerString("cat", "moose") ); //this would output "cat Problem 2 (15 points Insertion Loop) Write a java code fragment (not an entire method!!) that would insert the value contained at ar[4] (denoted by X) into the sorted array ar[0:3). That is when your code is done, ar[0:4) should be sorted. Ten points will be deducted for any solution that sorts the entire array. NO 23 31 45 53 X 3 4 Problem 3 (15 points) Write a java code fragment that would output the following: * ** The only output statements you may use are System.out.print(""); and System.out.println()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
