Place Declaration at the Beginning of Block (PDBB)

Description:

Sun Code Conventions for Java recommends to put declarations only at the beginning of blocks. (A block is any code surrounded by curly braces "{" and "}".) Don't wait to declare variables until their first use; it can confuse the unwary programmer and hamper code portability within the scope.

Example:

void myMethod() {
    if (condition) {
        doSomeWork();
        int int2 = 0;
        useInt2(int2);
    }
    int int1 = 0;
    useInt1(int1);
}