Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So I wrote this program in method form, except i\'m not sure how to call it. It\

ID: 3836528 • Letter: S

Question

So I wrote this program in method form, except i'm not sure how to call it. It's a file scanning program that contains a .txt file that has a few lines of string. Plese help

4 public class stri public static void mainCString args) 63 throws Fil eNotFoundException 10 11 stripCommentsOnew FileC"HW4Q4P1.txt")); 14 15 16 17 public static void stripCommentsCScanner read-input 188 19 20 21 String read line 22 m 23 while Cread input has NextLi 24 ne 25 26 27 read line read input nextLi 28 ne 29 if(read line contains C" read line 30 contains 31 32 33 System. out.printlnC); 34 35 36 37 38 else ifC read line contains C'*/") 39 else if Cread-line contains 45 int idx read-line .i System. out. printlnC read line subs tri ngCO idx)) 50 51 52 53 else 54 55 56 57 Svetem nut nrintin(rend line

Explanation / Answer

Answer:
You have to call like

stripComments(new Scanner(new File("HW4Q4P1.txt")));

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote