Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;

public class Main {
    public static void main(String[] args) throws Exception {

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        BufferedOutputStream bos = new BufferedOutputStream(baos);

        int b = 87;

        bos.write(b);

        bos.flush();

        byte[] bytes = baos.toByteArray();

        System.out.println(bytes[0]);

    }
}