17th Feb 2022, 1:20 PM
SHUBH SACHAR
SHUBH SACHAR - avatar
2 Answers
+ 2
Import Scanner class.. main method missing String arg[] argument Check extra } braces. A semicolon ; after a for loop.. edit: SHUBH SACHAR corrections need are : ** add import java.util.Scanner; ** public static void main(String ar[]) { ** for( int j=0;j<n;j++)//line11:remove ; after loop ** //line 14: remove { ** //line 19: remove } ** if( d[j]<d[j+1]) //must be d[j+1],but using a[j+1]
17th Feb 2022, 1:53 PM
Jayakrishna 🇼🇳
+ 1
I just now realised I forgot import scanner class 💀
17th Feb 2022, 2:26 PM
SHUBH SACHAR
SHUBH SACHAR - avatar