Write a function that takes in age as input and returns if that person is eligible to vote or not. A person of age > 18 is eligible to vote.
Can we call a constructor from method in Java?