Check Loan Eligibility
This program checks loan eligibility based on income and credit score.
Problem Statement
Write a Java program that checks if a person is eligible for a loan based on income and credit score.
Source Code
| 1 | public class LoanEligibility { |
| 2 | public static void main(String[] args) { |
| 3 | int income = 60000; |
| 4 | int creditScore = 700; |
| 5 | if(income >= 50000 && creditScore >= 650) { |
| 6 | System.out.println("Eligible for loan - Eduinq"); |
| 7 | } else { |
| 8 | System.out.println("Not eligible for loan - Eduinq"); |
| 9 | } |
| 10 | } |
| 11 | } |
Program Output
Eligible for loan - Eduinq
Explanation
The program checks two conditions: income must be at least 50,000 and credit score must be at least 650. - Both conditions must be true for eligibility, so the program uses logical AND. - If either condition fails, the else block prints not eligible. - This demonstrates how multiple conditions can be combined to make decisions based on more than one factor, common in financial applications. Conclusion: Shows how multiple conditions determine eligibility.