Computer Science, asked by 2adi, 1 year ago

a program to convert decimal into hexadecimal (blue java)

Answers

Answered by parthnikhar
1
Method 1: Decimal to hexadecimal Using toHexString() methodimport java.util.Scanner; class DecimalToHexExample { public static void main(String args[]) { Scanner input = new Scanner( System.in ); System.out.print("Enter a decimal number : "); int num =input.nextInt(); // calling method toHexString() String str = Integer.toHexString(num); System.out.println("Method 1: Decimal to hexadecimal: "+str); }
please vote me


2adi: hello...
2adi: hiii
2adi: i m fine....
2adi: u say..
Similar questions