Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to convert a hexadecimal number to a decimal inside a println in java

import java.util.*;
class Example{	
	public static void main(String asrgs[]){
		System.out.println(64);  	//prints 64. 
		System.out.println(0X64);	//Prints 100, Hex
		System.out.println(0X1A);	//Prints 26
		System.out.println(0X1a);	//Prints 26
	}
}
 
PREVIOUS NEXT
Tagged: #convert #hexadecimal #number #decimal #println #java
ADD COMMENT
Topic
Name
3+3 =