Please help me correcting this program .
Those who who will help me , will be marked branliest.
I'm allotting 100 points to get relevant answer , not to listen your answers like " I don't know" and all .
Please help ,
Don't act like fool.
Answers
Answer:
Explanation:
Hey bro!
I just wanted to tell you that your java file has no errors in actual.......
That error must be from the IDE that you are using.....
I suggest you to install BlueJ . It works completely fine and doesnt give mostly any problems and it also highlights what errors you do and in what line sometimes. These online IDEs are not reliable .
Heres my code :
import java.util.*;
public class OddorEven
{
public static void main()
{
Scanner sc= new Scanner(System.in);
int num;
System.out.println("Enter a integer number : ");
num = sc.nextInt();
if(num % 2 == 0)
System.out.println("Entered number is even ");
else
System.out.println("Entered number is odd");
}
}
I tested and ran it in bluej and it said no error and also the output was 100% correct!
Heres a pic of it
First you have to create a class.....ctrl + N (Normal class only)
Then Just paste ur code ....
Then compile it
Then close the editor and right click on the class box and then click void main()
And the program will run.
And my friend a small advice for you dont use string args in all the codes ...
It creates unnecessary error complications!!!!
My experience LOL
Hope this helps u my frnd!
Answer:
answer in the above text