Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static byte stringToHexBytes(int obj) {
        byte hex = 0;
        String aim = null;
        aim = String.valueOf(obj);
        if (aim != null && !aim.trim().equals(" ")) {
            hex = Byte.parseByte(aim, 16);
        }
        return hex;
    }
}