вопрос как тут сравнить то что я введу со scaner со значениями из price import java.util.Scanner; public class Main { public static void main(String[] args) { class Cars { String title; float price; } Scanner youMoney = new Scanner(System.in); float c = youMoney.nextInt(); Cars B[]; B = new Cars[4]; for (int i = 0; i < B.length; i++) B[i] = new Cars(); B[0].title = "bmw"; B[0].price = 12000.150f; B[1].title = "mazda"; B[1].price = 9000.0f; B[2].title = "kia"; B[2].price = 8000.0f; B[3].title = "honda"; B[3].price = 20000f; for (Cars cars : B) if (что ту должно быть ? ) System.out.println("вы можете позволить себе :" + cars.title); } }