简体   繁体   中英

java to vb.net - linkedlist to arraylist

I am converting java code to vb.net and this line of code gives me different output in enclipse than one in VS.

req1.set(req3, Integer.valueOf(((Integer)req1.get(req3)).intValue() ^ ((Integer)req6.get(req3 + 256)).intValue() & 0x1));
System.out.println(req1.get(req3));

where req1 is linkedlist, req3 is int, and req6 is linkedlist

and here is my vb.net snippet

req1(req3) = (req1(req3) Xor req6(req3 + 256) & &H1)
ListBox1.Items.Add(req1(req3))

where req1 is arraylist req3 is integer req6 is arraylist

output in eclipse (Correct One)

1
0
0
1

output in VS (Incorrect One)

60
661
970
411

All the code before this works perfectly in both IDEs.

I fixed it finally thanks everyone. I had to use "And" keyword inseatd of & sign

req1(req3) Xor req6(req3 + 256) And &H1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM