ln(&quot;This is a Windows box and therefore bad.&quot;) ;
		}
		else
		{
			System.out.println(&quot;This is not a box.&quot;) ;
		}
	}
}</pre>
<p>然后开始用面向对象的编程方式一步一步地进化这个代码。</p>
<p>先是以过程化的思路来重构之。</p>
<p> <a href="/articles/8745.html#more-8745" class="more-link">&#8230;</p>
<p class="read-more"><a class="btn btn-default" href="/articles/8745.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p>