Question: JAVA lanagugeWhere is the problem in my code? I use the Junit to check my code, but it shows a failure. public static String[] convertFileToStringArray(String
JAVA lanagugeWhere is the problem in my code? I use the Junit to check my code, but it shows a failure.

![to check my code, but it shows a failure. public static String[]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f05dd309425_69066f05dd2b04bb.jpg)
public static String[] convertFileToStringArray(String filename)f Scanner q -new Scanner(filename); int length 0; while(q.hasNextLine)) q.nextline(); length++t String fileToStringArray-new String[length]; Scanner p - new Scanner(filename); for(int index = e; indexlength; index++) { while(p.hasNext)) fileToStringArray[index)=p .next Line( ) .toLowerCase( ) ; p.close() q.close) return fileToStringArray
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
