C Programs Tutorials | IT Developer
IT Developer

Java Programs



Share with a Friend

Operators & Expressions

Java Program: Loan Eligibility check based on Salary & CIBIL

Eligibility Rules (Example)

Condition

Requirement

Minimum Salary

₹25,000

Minimum CIBIL Score

700

Loan is approved only if both conditions are satisfied.

 

import java.util.Scanner;

 

public class LoanEligibility {

    public static void main(String[] args) {

 

        Scanner sc = new Scanner(System.in);

 

        System.out.print("Enter Monthly Salary: ");

        double salary = sc.nextDouble();

 

        System.out.print("Enter CIBIL Score: ");

        int cibil = sc.nextInt();

 

        System.out.println("\n------ Loan Eligibility Result ------");

 

        if (salary >= 25000 && cibil >= 700) {

            System.out.println("Loan Status : APPROVED");

            System.out.println("Reason      : Salary and CIBIL criteria satisfied");

        } else {

            System.out.println("Loan Status : REJECTED");

 

            if (salary < 25000 && cibil < 700) {

                System.out.println("Reason      : Low salary and poor CIBIL score");

            } else if (salary < 25000) {

                System.out.println("Reason      : Salary below required limit");

            } else {

                System.out.println("Reason      : CIBIL score below required limit");

            }

        }

 

        sc.close();

    }

}

Output

 
OUTPUT 1: (Loan Approved)
INPUT :
Enter Monthly Salary: 35000
Enter CIBIL Score: 750

OUTPUT : 
------ Loan Eligibility Result ------
Loan Status : APPROVED
Reason      : Salary and CIBIL criteria satisfied

OUTPUT 2: (Loan Rejected – Low Salary)
INPUT :
Enter Monthly Salary: 20000
Enter CIBIL Score: 780

OUTPUT : 
------ Loan Eligibility Result ------
Loan Status : REJECTED
Reason      : Salary below required limit


        
OUTPUT 3: (Loan Rejected – Low CIBIL) INPUT : Enter Monthly Salary: 30000 Enter CIBIL Score: 650 OUTPUT : ------ Loan Eligibility Result ------ Loan Status : REJECTED Reason : CIBIL score below required limit OUTPUT 4: (Both Conditions Failed) INPUT : Enter Monthly Salary: 18000 Enter CIBIL Score: 600 OUTPUT : ------ Loan Eligibility Result ------ Loan Status : REJECTED Reason : Low salary and poor CIBIL score

Explanation

1. Input Collection

double salary = sc.nextDouble();

int cibil = sc.nextInt();

  • Salary stored as double
  • CIBIL score stored as int

2. Combined Logical Expression

if (salary >= 25000 && cibil >= 700)

  • Uses Logical AND (&&)
  • Loan is approved only if both conditions are true

3. Rejection Reasons

Nested conditions check:

  • Low salary
  • Low CIBIL score
  • Both failed

This improves clarity and real-world relevance.

Key Concepts Used

Logical AND (&&)
Nested if–else
Decision-making statements
User input with Scanner

📌 Short Exam Answer

This program checks loan eligibility using combined logical expressions. If the applicant’s salary and CIBIL score meet the required limits, the loan is approved; otherwise, it is rejected with appropriate reasons.