Household income using java array and method
These coding have error on line total=income*siblings, can anyone help me pleaseeee import java.util.Scanner; public class PoorRich { public static void main(String[]args){ double total; Scanner input= new Scanner(System.in); System.out.println("enter the number of siblings:"); int siblings=input.nextInt(); System.out.println("enter income of the family:"); for(int i=0; i<siblings; i++) { double income = input.nextDouble(); } total = income * siblings; group(total); } public static void group(double total){ if(total>=10000.00){ System.out.println("rich"); } else{ System.out.println("poor"); } } }