✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Considera la següent funció getValor
que pot retornar null
si un element no es troba en un mapa:
Per provar que el mètode getValor
retorna null
quan la clau no existeix en el mapa, quin mètode d'assertion hauríem d'utilitzar?
public class MapUtils { public static Object getValor(Map<String, Object> mapa, String clau) { return mapa.get(clau); }} |
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!