Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String arr2String(int[] arr) {
        String str = "";
        for (int i = 0; i < arr.length; i++) {
            String string = Integer.toHexString(arr[i]);
            if (string.length() == 1) {
                string = "-" + string;
            }
            str = str + string;
        }
        return str;
    }
}