N
N
Nikita2017-07-28 10:58:50
Java
Nikita, 2017-07-28 10:58:50

Using this c return?

Help me please!
Give me this code. Tell me what exactly this is for. Maybe someone can throw off a tutorial on the topic "using this c return" because no matter how you google it ..bde28b23a78f4269b3f08513a3452442.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D3lphi, 2017-07-28
@NeToster

In order to be able to make calls "chained":
That is, the increment() method returns the object to which it belongs.
If it didn't return this, then you would have to do this:

x.increment();
x.increment();
x.increment();
x.print();

A
aol-nnov, 2017-07-28
@aol-nnov

ok google, what is a fluent interface?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question