Online Java Compiler By
JavaTpoint.com
public class IntegerToHexStringExample3 { public static void main(String[] args) { System.out.println(Integer.toHexString(250)); System.out.println(Integer.toHexString(-250)); System.out.println(Integer.toHexString(1050)); System.out.println(Integer.toHexString(-1050)); } }
Output