Find the bracket!
if (s.equals("Something")) {
//
// Here comes the code...
//
} else if (s.equals(s.substring(s.indexOf("Search")))) {
//
// Here comes the code...
//
}
A simple piece of code.
Maybe the second if-statement looks a bit more complicated, especially the number of parentheses.
Well OK, it isn't that complicated, but it will demonstrate my tip.
Suppose we forget if we have included enough parentheses?
We can simply look for the corresponding parenthesis by placing the cursor before the opening paranthesis and type Alt-].
The cursor will jump to the closing parenthesis (if JBuilder can find one).
We can also place the cursor before the closing parenthesis and type Alt-[ to go the corresponding opening parenthesis.
The same commands can be used for curly brackets.