I can't but notice that when each cell in ipython notebook produces output, it includes the whole code as well.

For example, look at the picture. It shows the method definition as well. clearly I don't need it as I've already wrote it. So, is there a way so that it would NOT show the method definition as well?
Also, the Jshell only shows Added method twice(String). So, can the output of ipython be manipulated? If so, how? (I don't know how to write ipython kernels)