|
http://www.jindent.com |
Previous: Arrows
|
Next: Brackets
|
| Combine padding parentheses to prevent white spaces |

|
if(·(·(·x·==·10·)·||·(·0·<·y·)·)·&&·(·y·<=·10·)·)·{ ... } |
|
if(((·x·==·10·)·||·(·0·<·y·))·&&·(·y·<=·10·))·{ ... } |
| Space before left parentheses of constructor and function declarations |

|
void·methodA·(int·param) { ... } |
|
void·methodA(int·param) { ... } |
| Padding parentheses of constructor and function declarations |

|
void·method(·int·a,·int·b·)·{ ... } |
|
void·method(int·a,·int·b)·{ ... } |
| Space before left parentheses of constructor and function calls |

|
if·(a·<·10) { callMethod·(a); } |
|
if·(a·<·10) { callMethod(a); } |
| Padding parentheses of constructor and function calls |

|
if·(a·<·10)·{ callMethod(·int·a·); ... } |
|
if·(a·<·10)·{ callMethod(int·a); ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| No padding of empty parentheses |

|
void·method(·int·a,·int·b·)·{ callMethod(·int·a·); doNothing(·); ... } void·doNothing(·)·{ ... } |
|
void·method(·int·a,·int·b·)·{ callMethod(·int·a·); doNothing(); ... } void·doNothing()·{ ... } |
| Padding expression parentheses |

|
boolean·value·=·(·x·==·10·)·||·(·0·<·y·); |
|
boolean·value·=·(x·==·10)·||·(0·<·y); |
|
See also: | Combine padding parentheses to prevent white spaces |
| Space before left parentheses of for statements |

for statements or not.|
for·(int·i·=·0;·i·<·n;·i++)·{ ... } |
|
for(int·i·=·0;·i·<·n;·i++)·{ ... } |
| Padding parentheses of for statements |

for statements or not.|
for·(·int·i·=·0;·i·<·10;·i++·)·{ ... } |
|
for·(int·i·=·0;·i·<·10;·i++)·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Space before left parentheses of if statements |

if statements or not.|
if·(a·<·10)·{ ... } |
|
if(a·<·10)·{ ... } |
| Padding parentheses of if statements |

if statements or not.|
if·(·x·<·y·)·{ ... } |
|
if·(x·<·y)·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Space before left parentheses of while statements |

while statements or not.|
while·(i·<·10)·{ ... } |
|
while(i·<·10)·{ ... } |
| Padding parentheses of while statements |

while statements or not.|
while·(·i·<·10·)·{ ... } |
|
while·(i·<·10)·{ ... } |
|
See also: | Combine padding parentheses to prevent white spaces |
| Space before left parentheses of catch statements |

catch statements or not.|
try·{ ... }·catch·(int·e)·{ ... } |
|
try·{ ... }·catch(int·e)·{ ... } |
| Padding parentheses of catch statements |

catch statements or not.|
try·{ ... }·catch·(·int·e·)·{ ... } |
|
try·{ ... }·catch·(int·e)·{ ... } |
| Space before left parentheses of switch statements |

switch statements or not.|
switch·(a)·{ case·1·: ... } |
|
switch(a)·{ case·1·: ... } |
| Padding parentheses of switch statements |

switch statements or not.|
switch·(·a·)·{ case·1·: ... } |
|
switch·(a)·{ case·1·: ... } |
| Space before left parentheses of throw statement and declaration |

throw statements and declarations.|
void·method()·throw·(UNEXPECTED_ERROR)·{ ···... ···throw·(UNEXPECTED_ERROR); } |
|
void·method()·throw(UNEXPECTED_ERROR)·{ ···... ···throw(UNEXPECTED_ERROR); } |
| Padding parentheses of throw declarations |

throw declarations in methods/constructors/destructors.|
void·method(int·x,·int·y)·throw·(·UNEXPECTED_ERROR·)·{ ····//·... } |
|
void·method(int·x,·int·y)·throw·(UNEXPECTED_ERROR)·{ ····//·... } |
| Space before left parentheses of return statement |

return statements or not.return statements
as method calls.)|
return·(value); |
|
return(value); |
| Space before left parentheses of sizeof operators |

sizeof operators.|
int·x·=·sizeof·(p); |
|
int·x·=·sizeof(p); |
| Padding parentheses of sizeof operators |

sizeof operators.|
int·x·=·sizeof(·p·); |
|
int·x·=·sizeof(p); |
| Space after right parentheses of castings |

|
int·value·=·(int)·floatValue; |
|
int·value·=·(int)floatValue; |
| Padding parentheses of castings |

|
int·value·=·(·int·)·floatValue; |
|
int·value·=·(int)·floatValue; |
|
See also: | Combine padding parentheses to prevent white spaces |