|
http://www.jindent.com |
Previous: Braces
|
Next: Generics
|
| Padding assignment operators = += -= /= *= ... |

|
int·x·=·y-1; |
|
int·x=y-1; |
| Padding conditional operators && || |

|
boolean·b·=·condition1·&&·(condition2·||·condition3); |
|
boolean·b·=·condition1&&(condition2||condition3); |
| Padding equality operators == != |

|
boolean·b·=·(value1·==·value2)·||·(value3·!=·value4); |
|
boolean·b·=·(value1==value2)·||·(value3!=value4); |
| Padding relational operators < > <= => |

|
boolean·b·=·(value1·<·value2)·||·(value3·=>·value4); |
|
boolean·b·=·(value1<value2)·||·(value3=>value4); |
| Padding additive operators + - |

|
int·value·=·a·+·b·-·c; |
|
int·value·=·a+b-c; |
| Padding multiplicative operators * / % |

|
float·value·=·a·*·b·/·c; |
|
float·value·=·a*b/c; |
| Padding bitwise operators & | ^ |

|
int·value·=·a·&·255·|·b; |
|
int·value·=·a&255|b; |
| Padding shift operators << >> >>> |

|
byte·value·=·a·<<·3; |
|
byte·value·=·a<<3; |
| Space before bangs ! |

|
if(·!(x·==·3)){ callMethodC(); } |
|
if(!(x·==·3)){ callMethodC(); } |
| Space after bangs ! |

|
if(!·(x·==·3)){ callMethodC(); } |
|
if(!(x·==·3)){ callMethodC(); } |
| Space before bangs ! appearing together with && || |

&&)/or (||) conditions or not.|
if(((w==y)·||·!(w>=0))·&&·!(w<y))·{· ... } |
|
if(((w==y)·||!(w>=0))·&&!(w<y))·{· ... } |
| Space after bangs ! appearing together with && || |

&&)/or (||) conditions or not.|
if(((w==y)·||!·(w>=0))·&&!·(w<y))·{· ... } |
|
if(((w==y)·||!(w>=0))·&&!(w<y))·{· ... } |
| Space before tildes ~ |

|
byte·u·=·~1; |
|
byte·u·=~1; |
| Space after tildes ~ |

|
byte·u·=·~1; |
|
byte·u·=·~·1; |
| Padding of exception multicatch operators | |

|
try·{ ···//·do·something }·catch(final·ExceptionA·|·ExceptionB·|·ExceptionC·ex)·{ ···log(ex); } |
|
try·{ ···//·do·something }·catch(final·ExceptionA|ExceptionB|ExceptionC·ex)·{ ···log(ex); } |