Here you can find the source of invert(int[] bits)
private static int[] invert(int[] bits)
//package com.java2s; //License from project: Apache License public class Main { private static int[] invert(int[] bits) { for (int i = 0; i < bits.length; i++) { bits[i] = ~bits[i];//from w w w .j av a 2s . co m } return bits; } }