Java program to find whether the person eligible for vote or not

Java program to find whether the person is eligible for vote or not 

public class EligibleOrNot
{
    public static void main(String args[ ])
    {
        int a=20;
        if(a>18)
     {
        System.out.println("Person is eligible for vote");
    }
     else
     {
      System.out.println("Person is not eligible for vote");
       }
     }
}



Output 

Person is eligible for vote 

Comments