Java Bit Print printBits(int meta)

Here you can find the source of printBits(int meta)

Description

print Bits

License

Open Source License

Declaration

public static void printBits(int meta) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void printBits(int meta) {
        for (int k = 0; k < 4; k++) {
            if (((meta >> k) & 1) == 1) {
                System.out.print(1);
            } else {
                System.out.print(0);
            }/*from   www. ja  va  2  s  .  c  o m*/
        }
        System.out.println();
    }
}

Related

  1. printBitBinary(byte[] bytes)
  2. printBitboard(long bitboard)
  3. printBitFormat(int number)
  4. printBitLong(long A)
  5. printBits(byte[] bytes)
  6. printBits(int number, int n)
  7. printBits(long val, int bits)
  8. printBits(long value)