java – invalid method declaration; return type required
In your method setDetails you haven’t specified anything for the return type, if it is not returning anything then specify void For Voter class for Candidates class One other thing, (Thanks to Frank Pavageau) your class name is Candidates and you have defined the constructor with Candidate without s, that is why it is being considered as a normal method, and thus should have a return type. You your rename … Read more