下面的程序为什么编译出错:
NotThreadSafe cannot be resolved to a typepackage net.jcip.examples;import net.jcip.annotations.*;/**
* UnsafeSequence
*
* @author Brian Goetz and Tim Peierls
*/@NotThreadSafe
public class UnsafeSequence {
private int value; /**
* Returns a unique value.
*/
public int getNext() {
return value++;
}
}
NotThreadSafe cannot be resolved to a typepackage net.jcip.examples;import net.jcip.annotations.*;/**
* UnsafeSequence
*
* @author Brian Goetz and Tim Peierls
*/@NotThreadSafe
public class UnsafeSequence {
private int value; /**
* Returns a unique value.
*/
public int getNext() {
return value++;
}
}
java concurrent in practice还是不错的
}