Home > Back-end >  Java data in the binary representation
Java data in the binary representation

Time:03-03

Java is not use a 0 b to represent a binary number, why prompt syntax error

CodePudding user response:

No binary representation
Can use the parseInt Integer or the valueOf
For example,
Int c=Integer. ParseInt (" 10100001 ", 2) & amp; Integer. ParseInt (" 10000000 ", 2);

CodePudding user response:

reference 1st floor qybao response:

no binary representation methodCan use the parseInt Integer or the valueOf
For example,
Int c=Integer. ParseInt (" 10100001 ", 2) & amp; Integer. ParseInt (" 10000000 ", 2);

Why ~ 11011110 results for 11111111111111111111111100100001? Why is this so
  • Related