I am a beginner programmer.

I have a question about the way of returning a `boolean` value.

Which do you like? For what reason?

1.

```
public boolean methodA(List<String> targetList){
    boolean result = false;         
        for(String str : targetList){

            if(str.equals("word1")) {
                result = true;
                break;
            }
            if(str.equals("word2")) {
                result = true;
                break;
            }
        }
    return result;
}

```

2.

```
public boolean methodB(List<String> targetList){
    boolean result = false;         
        for(String str : targetList){

            if(str.equals("word1")) {
                return true;
            }
            if(str.equals("word2")) {
                return true;
            }
        }
    return result;
}

```