Java7 Binary Literals

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Java7 Binary Literals - Java Tutorials Corner

Statistics

  • Total Hits - 5566

  • Total Votes - 4 votes

  • Vote Up - 2 votes

  • Vote Down - 2 votes

  • Domain - www.javatutorialcorner.com

  • Category - JAVA/Core JAVA

  • Submitted By - Appu T

  • Submitted on - 2014-03-16 08:59:52

Description

In this tutorials we are going to see the integral types (byte, short, int, and long ) in java7.This tutorials is created by referring Oracle official web site.Some content is taken from there. In Java7, the integral types (byte, short, int, and long ) can also expressed using binary number system.To specify binary literal, add prefix 0b or 0B to the number.Example for binary literals: 1. 8-bit byte value : byte b = (byte)0b00010001; 2. 16-bit short value : short s = (short)0b1000100010001000; 3. 32-bit int values : int i1 = 0b001;... - See more at: http://www.javatutorialcorner.com/search/label/Java ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements