a program to convert decimal into hexadecimal (blue java)
Answers
Answered by
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
please vote me
2adi:
hello...
Similar questions