get方法和increase都需要有同步(synchronized)标记。
建设把get和increase作在一个方法里,在方法里将涉及同步的语句段用
synchronized{
}
标记起来,这样可以提高效率,而且避免死锁。