Split Temporary Variable
From CSSEMediaWiki
This is when you have create a temporary variable that you use all the way through a method.<br>
foo() {<br> int temp = 2 * (height + width);<br> System.out.print(temp);<br> temp = height * width;<br> System.out.print(temp);<br> }<br>
<br> The variable has two different meanings at various stages of the method. Give each variable a descriptive name making it easier to understand the code.<br> <br>
foo() {<br> int perimeter = 2 * (height + width);<br> System.out.print(perimeter);<br> int area = height * width;<br> System.out.print(area);<br> }