What does return do when used inside an if statement?

后端 未结 8 1633
醉梦人生
醉梦人生 2020-12-31 02:16

What does the return inside the if statements do in the following code?

public void startElement(String namespaceURI, String localName,String qName, 
               


        
8条回答
  •  臣服心动
    2020-12-31 02:43

    Does it takes us out of the if statement and proceeds to next statement or it takes us out of the method startElement?

    It takes you out of the method.. The return statement terminates the execution of a function

提交回复
热议问题