Search code examples
javaeclipsejalopy

Why does Jalopy format my Java code this way?


When I type an entry for an array in java this way, Jalopy (an alternate program to Jindent) switches the square bracket to the other side. Am I typing the wrong way or what?

Before formatting:

Before

After formatting:

After


Solution

  • Using square bracket after variable name is old style of C,C++. While placing it with the type name is recommended by Java. It is specific to java code style. Since Jalopy is specifically there to format java Code it uses recommended Java style to format. and Hence the code is changing.