Posts by user60896 • 31 points
2 posts
-
0
votes2
answers187
viewsA: Doubt with use of Optional
I’ve created a method, I think you’re right public String temNome(Profissao profissao) { Optional<String> nomeProfissao = Optional.ofNullable(profissao.getNomeP());…
-
3
votes2
answers187
viewsQ: Doubt with use of Optional
I am trying to use this optional class to get the data with null, but returns error. In the main class, I use the for with this method. Profession and composition of persons. for(Pessoa p : pessoas)…