java程式語言 - 考試
By Edith
at 2014-01-04T00:02
at 2014-01-04T00:02
Table of Contents
題目:
下列java程式片段執行的結果為何?
(A)3,3,3(B)0,0,0(C)3,0,0(D)Compile-time error
public static void main(String[] args){
int x= 1||2^3&&5;
int y=((1||2)^3)&&5;
int z=1||(2^(3&&5));
System.out.print(x+","+y+","+z);
}
我算出來x=0,y=0,z=3,但是選項裡無此答案!!
想請問一下各位大大這題要怎麼解!!謝謝><...
--
下列java程式片段執行的結果為何?
(A)3,3,3(B)0,0,0(C)3,0,0(D)Compile-time error
public static void main(String[] args){
int x= 1||2^3&&5;
int y=((1||2)^3)&&5;
int z=1||(2^(3&&5));
System.out.print(x+","+y+","+z);
}
我算出來x=0,y=0,z=3,但是選項裡無此答案!!
想請問一下各位大大這題要怎麼解!!謝謝><...
--
Tags:
考試
All Comments
By Rae
at 2014-01-04T08:59
at 2014-01-04T08:59
By Ivy
at 2014-01-07T23:32
at 2014-01-07T23:32
By Carolina Franco
at 2014-01-12T22:42
at 2014-01-12T22:42
By Ingrid
at 2014-01-14T16:42
at 2014-01-14T16:42
By Megan
at 2014-01-19T07:45
at 2014-01-19T07:45
By Gary
at 2014-01-20T15:53
at 2014-01-20T15:53
By Leila
at 2014-01-22T11:12
at 2014-01-22T11:12
By Carol
at 2014-01-25T04:49
at 2014-01-25T04:49
By Frederica
at 2014-01-27T01:04
at 2014-01-27T01:04
By Blanche
at 2014-01-31T20:48
at 2014-01-31T20:48
By James
at 2014-02-04T17:07
at 2014-02-04T17:07
Related Posts
唸警專國文對初等國文有幫助嗎?
By Connor
at 2014-01-03T23:51
at 2014-01-03T23:51
刑法考題請教
By Elizabeth
at 2014-01-03T23:31
at 2014-01-03T23:31
行政學-人事行政
By Jacob
at 2014-01-03T23:30
at 2014-01-03T23:30
公務人員考試法三讀 滿3年才能轉調
By Hedda
at 2014-01-03T23:15
at 2014-01-03T23:15
公務人員考試法三讀 滿3年才能轉調
By Skylar DavisLinda
at 2014-01-03T23:11
at 2014-01-03T23:11