What does “this()” method mean?

后端 未结 8 2024
眼角桃花
眼角桃花 2020-12-13 03:33

I ran into this block of code, and there is this one line I don\'t quit understand the meaning or what it is doing.

public Digraph(In in) {
    this(in.readI         


        
8条回答
  •  情歌与酒
    2020-12-13 04:22

    Calling this essentially calls the class Constructor. For example, if you're extending something, than along with add(JComponent), you could do: this.add(JComponent).

提交回复
热议问题