Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String args[]) {
        byte b1 = 127;
        System.out.println(b1);
        System.out.println(unsignedByteToInt(b1));
    }

    public static int unsignedByteToInt(byte b) {
        return (int) b & 0xFF;
    }
}