Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * @param numBits
     * @param bitsPerDigit
     * @return
     */
    private static int getNumDigits(final int numBits, final int bitsPerDigit) {
        int numDigits = (numBits / bitsPerDigit) + ((numBits % bitsPerDigit) == 0 ? 0 : 1);
        numDigits = Math.max(1, numDigits);
        return numDigits;
    }
}