Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.1.6 Empty Statements/Declarations

title
5.6.1.6.1 Misc

Put empty statements and declarations on new line

Put empty statements and declarations on new line

Controls formatting of empty declarations and statements.
Empty declarations and statements are just consist of a single semicolon ; without any real functionality. They are mostly used as code separators or place holders.


Do not put empty statements/declarations on new line will preserve semicolon formatting from input source code:

public abstract class ClassA {          
                                        
    
int x=10;                           
                                        
    ;;;;;          
// semicolons used as separator
                                        
    
public void method(int a) {         
        ;;                              
    }                                   
                                        
    
public abstract int getA();;        
}                                       


Put empty statements/declarations on new line:

public abstract class ClassA {          
                                        
    
int x=10;                           
                                        
    ;                                   
    ;                                   
    ;                                   
    ;                                   
    ;          
// semicolons used as separator
                                        
    
public void method(int a) {         
        ;                               
        ;                               
    }                                   
                                        
    
public abstract int getA();         
                                        
    ;                                   
}