public class Operator {
public static void main(String[] args) {
byte a = 5;
int b = 10;
int c = a >> 2 + b >> 2;
System.out.print(c); //prints 0
}
}
當5右移2位時是1,右移
任何人都可以幫助我解決以下問題嗎? public class Starter extends Thread{
private int x=2;
public static void main(String[] args) throws Exception{
new Starter().makeItSo();
}
public Starter(){
這裏的輸出是SCJP轉儲一個問題: public class Threads1 {
int x=0;
public class Runner implements Runnable{
public void run(){
int current=0;
for (int i=0; i<4; i++){
current
爲OCPJP 6考試做準備(這就是爲什麼我使用Java 1.6編譯器)我注意到了我對Java泛型的一些不清楚。 考慮下面的代碼: class A<K extends Number> {
public <V> V useMe1(A<? super V> a) { // OK
return null;
}
public <V> V useMe2(A<? e
public class ClassA {
public void count(int i)
{
count(++i); //throws StackOverFlowError
}
public static void main(String[] args) {
ClassA a = new ClassA();