0
Why my program show error??
7 odpowiedzi
+ 6
Raj kiran Singh
There is no error in your program!!
+ 5
Looks fine to me. I'm not getting any errors when running it. Is that the complete code?
+ 2
import java.util.Scanner;
write this before your class in the first line
you need to import scanner.
Raj kiran Singh
+ 1
this is ok this is post by fault the another program
https://code.sololearn.com/cQ3g46Kt84Y7/?ref=app
this is the program which show error
+ 1
import java.util.Scanner;
public class sum
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter the fist number");
int a=sc.nextInt();
System.out.println("enter the second number");
int b=sc.nextInt();
int sum=a+b;
System.out.println("the sum is"+sum);
}
}
0
Hey just remove space In square bracket and it's working now
In String[] args
0
No error for me..
Raj kiran Singh whats is your problem?