Java - Does returning a value break a loop?

前端 未结 5 1582
时光说笑
时光说笑 2020-12-02 10:42

I\'m writing some code that basically follows the following format:

public static boolean isIncluded(E element) {
    Node c = head;
    while (c !=         


        
5条回答
  •  离开以前
    2020-12-02 11:15

    Yes.

    Anyway, for questions as short as this, I think you would be better (and get an earlier answer) just trying it by yourself.

提交回复
热议问题