Question: I need help getting started S. Create a method that will receive an integer parameter and then return an ArrayList that contains all of the

I need help getting started
S. Create a method that will receive an integer parameter and then return an ArrayList that contains all of the number's factors, excluding itself. Note that getListofFactors is a static method which means you don't create an ArrayList FunHouse object to call it. import java.util.ArrayList; public class ArrayList Fun House //returns an ArrayList with the factors of number public static ArrayList getListofFactors(int number) ArrayList factors = new ArrayList(): 1/Driver public class FactorList public static void main(String args[]) System.out.println( ArrayList FunHouse.getListofFactors(9)); System.out.println( ArrayList FunHouse.getListofFactors (23)); System.out.println( ArrayList FunHouse.getListOfFactors(50) ): System.out.println( ArrayList FunHouse.getListofFactors(100)); System.out.println( ArrayList FunHouse.getListOfFactors(762)); } Sample Data: Sample Output 11. 31 100 762 [1, 2, 5, 10, 25] [1, 2, 4, 5, 10, 20, 25, 50 [1,2, 3, 6, 127, 254, 381]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
