Computer Science, asked by harshit95828classwor, 19 days ago

class Voting
{
public static void main()
{
String n;
int age;
n="Harry";
age=13;
if(age>=18);
{
System.out.println("eligiable, to ,vote");
}
else
{
System.out.println("not ,eligiable, to ,vote"); } } }



WHAT IS THE ERROR IN THIS PROGRAM​

Answers

Answered by tanshi266
1

Possibly the error is due to the semicolon (;) you have applied after the 'if' statement.

You can remove it and try again...

Still if it doesn't work you can comment me down any time :)

Similar questions