Using underscores with hexadecimal literals - Java Language Basics

Java examples for Language Basics:Primitive Types

Description

Using underscores with hexadecimal literals

Demo Code

public class Main {
  public static void main(String[] args) {
    int commandInHex = 0xE_23D5_8C_7;
    int commandInBinary = 0b1110_0010001111010101_10001100_0111;
  }/*from w ww  .  j  a  v a  2  s . co  m*/
}

Related Tutorials