Java:
Код: Выделить всё
public class MyClass {
static public int GenerateChecksumCrc16(byte bytes[]) {
int crc = 0xFFFF;
int temp;
int crc_byte;
for (byte aByte : bytes) {
crc_byte = aByte;
for (int bit_index = 0; bit_index < 8; bit_index++) {
temp = ((crc >> 15)) ^ ((crc_byte >> 7));
crc
Подробнее здесь: [url]https://stackoverflow.com/questions/44255946/difference-between-a-class-and-object-in-kotlin[/url]