It's a stupid question but why does this code work?
public static void main(String[] args) throws ParseException {
List<String> lista2 = teste();
System.out.println(lista2.toString());
}
In this method I should return a list but have a second 'return null' should it not be executed too?
public static List<String> teste(){
List<String> meu = new ArrayList<String>();
meu.add("iodfsj");
meu.add("jfgfy");
meu.add("ophgkyp");
meu.add("jifrl");
if(true){
return meu;
}
return null;
}