Français
Ouvrir dans Telegram

Publicationimport java.util.*;

13 mai 2025
D
Deloitte | COGNIZANT | IBM | CAPGEMINI
import java.util.*; class Customer { private int customerId; private String customerName; private int numberOfOrders; public Customer() {} public Customer(int customerId, String customerName, int numberOfOrders) { this.customerId = customerId; this.customerName = customerName; this.numberOfOrders = numberOfOrders; } // Getters public int getCustomerId() { return customerId; } public String getCustomerName() { return customerName; } public int getNumberOfOrders() { return numberOfOrders; } public void setCustomerId(int customerId) { this.customerId = customerId; } public void setCustomerName(String customerName) { this.customerName = customerName; } public void setNumberOfOrders(int numberOfOrders) { this.numberOfOrders = numberOfOrders; } } public class Main { public static HashMap<String, String> getCustomerWithOrders(List<Customer> customers) { HashMap<String, String> result = new HashMap<>(); if (customers == null || customers.isEmpty()) { return result; } Customer maxCustomer = customers.get(0); for (Customer customer : customers) { if (customer.getNumberOfOrders() > maxCustomer.getNumberOfOrders()) { maxCustomer = customer; } } result.put("CustomerID", String.valueOf(maxCustomer.getCustomerId())); result.put("CustomerName", maxCustomer.getCustomerName()); result.put("CustomerOrders", String.valueOf(maxCustomer.getNumberOfOrders())); return result; } } customer with maximum orders✅✅ #Genpact
1.1K ·

À proximité dans le fil

DDeloitte | COGNIZANT | IBM | CAPGEMINICTS 4pm python coding ✅✅ Contact: @MLCODER2DDeloitte | COGNIZANT | IBM | CAPGEMINICTS JAVA 7PM✅✅ Contact : @MLCODER2
ce message
DDeloitte | COGNIZANT | IBM | CAPGEMINICTS exam cleared & GOT an interview mail 🥳🥳✅✅ 100% clearance for your exam and interview ✅ Contact:@MLCODER2DDeloitte | COGNIZANT | IBM | CAPGEMINICTS exam cleared & GOT an interview mail 🥳🥳✅✅ 100% clearance for your exam and interview ✅ Contact:@MLCODER2
DDeloitte | COGNIZANT | IBM | CAPGEMINIDeloitte | COGNIZANT | IBM | CAPGEMINI@python_java_Coding · canal · Technologie
7 178abonnés406portée moyenne d'une publication
Fil de la communauté Ouvrir dans Telegram

Un fil public ouvert issu de l'index de recherche ChatCrawler — « le Google du Telegram public » ; actualisé à mesure que la communauté est explorée. Les heures sont en UTC.

Contenu public uniquement, API officielle de Telegram. À propos · FAQ · Limites de l'index · Retirer une page · Catalogue · Recherche · Comment nous comptons