Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.nio.ByteBuffer;

public class Main {
    public static byte[] sumByte(byte[] bytes1, byte[] bytes2) {
        ByteBuffer byteBuffer = ByteBuffer.allocate(bytes1.length + bytes2.length);
        byteBuffer.put(bytes1);
        byteBuffer.put(bytes2);
        return byteBuffer.array();
    }
}