Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getBCC(byte[] paramArrayOfByte) {
        byte[] arrayOfByte = new byte[1];
        for (int i = 0;; i++) {
            if (i >= paramArrayOfByte.length) {
                String str = Integer.toHexString(0xFF & arrayOfByte[0]);
                if (str.length() == 1) {
                    str = '0' + str;
                }
                return "" + str.toUpperCase();
            }
            arrayOfByte[0] = ((byte) (arrayOfByte[0] ^ paramArrayOfByte[i]));
        }
    }
}