C Programs Tutorials | IT Developer
IT Developer

Java Programs



Share with a Friend

Operators & Expressions

Java Program: Multi-Condition Eligibility (Job Application Screening)

Eligibility Criteria (Example)

An applicant is eligible if ALL the following conditions are satisfied:

  • Age between 21 and 35 years
  • Education: Graduate or Post-Graduate
  • Minimum 2 years of experience
  • Passed Aptitude Test

import java.util.Scanner;

 

public class JobEligibilityCheck {

    public static void main(String[] args) {

 

        Scanner sc = new Scanner(System.in);

 

        System.out.print("Enter Age: ");

        int age = sc.nextInt();

 

        sc.nextLine(); // clear buffer

        System.out.print("Enter Education (Graduate/PostGraduate): ");

        String education = sc.nextLine();

 

        System.out.print("Enter Years of Experience: ");

        int experience = sc.nextInt();

 

        System.out.print("Passed Aptitude Test? (true/false): ");

        boolean aptitude = sc.nextBoolean();

 

        System.out.println("\n------ Job Application Screening Result ------");

 

        if ((age >= 21 && age <= 35)

                && (education.equalsIgnoreCase("Graduate")

                || education.equalsIgnoreCase("PostGraduate"))

                && experience >= 2

                && aptitude) {

 

            System.out.println("Status : ELIGIBLE");

            System.out.println("Message: Candidate meets all requirements");

        } else {

            System.out.println("Status : NOT ELIGIBLE");

 

            if (age < 21 || age > 35)

                System.out.println("Reason : Age not within allowed range");

 

            if (!(education.equalsIgnoreCase("Graduate")

                    || education.equalsIgnoreCase("PostGraduate")))

                System.out.println("Reason : Required education not met");

 

            if (experience < 2)

                System.out.println("Reason : Insufficient experience");

 

            if (!aptitude)

                System.out.println("Reason : Aptitude test not cleared");

        }

 

        sc.close();

    }

}

Output

 
OUTPUT 1: (Eligible Candidate)
INPUT : 
Enter Age: 28
Enter Education (Graduate/PostGraduate): Graduate
Enter Years of Experience: 3
Passed Aptitude Test? (true/false): true

OUTPUT :
------ Job Application Screening Result ------
Status : ELIGIBLE
Message: Candidate meets all requirements

OUTPUT 2: (Not Eligible Candidate)
INPUT : 
Enter Age: 19
Enter Education (Graduate/PostGraduate): Diploma
Enter Years of Experience: 1
Passed Aptitude Test? (true/false): false

OUTPUT :
------ Job Application Screening Result ------
Status : NOT ELIGIBLE
Reason : Age not within allowed range
Reason : Required education not met
Reason : Insufficient experience
Reason : Aptitude test not cleared

Explanation

1.  Input Collection

The program accepts:

  • Age (int)
  • Education (String)
  • Experience (int)
  • Aptitude test result (boolean)

2. Combined Logical Conditions

(age >= 21 && age <= 35)

&& (education == Graduate OR PostGraduate)

&& experience >= 2

&& aptitude == true

  • && → Logical AND (all conditions must be true)
  • || → Logical OR (either education is accepted)

3. Eligibility Decision

  • If all conditions are satisfied, the candidate is marked ELIGIBLE
  • Otherwise, NOT ELIGIBLE and specific reasons are printed

4. Real-World Relevance

This logic mimics HR screening systems used in:

  • Job portals
  • Recruitment automation
  • Campus placement software

Key Concepts Used

Multi-condition logical expressions
Logical AND (&&) and OR (||)
Boolean variables
String comparison using equalsIgnoreCase()
Nested if conditions

📌 Short Exam Answer

This program checks job eligibility using multiple logical conditions. A candidate is eligible only if age, education, experience, and aptitude criteria are satisfied. Otherwise, rejection reasons are displayed.