Intellij IDEA: How can I format the code and how can I see the changes?

  • Cand. I am doing format code to do something like this:

Before

int a = 1;





int b = 2;




return a+b;

      

After

int a = 1;
int b = 2;
return a+b;

      

Second question:

I have a web application. I am running a web application and after that I made changes to the java file.

How can I see the change without stopping and restarting the server - a shorter method?

+2


a source to share


1 answer


  • No, empty lines inside methods are not removed. Settings | Code Style | Blank lines can control it in many places, but not inside methods.

  • Easy, see the related blog post .



0


a source







All Articles