Skip to content

Commit 5684534

Browse files
committed
convert hex to decimal
1 parent 73f25ab commit 5684534

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hex-to-decimal.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class hextodecimal
2+
{
3+
public static void main(String args[])
4+
{
5+
String hex="a";
6+
int decimal=Integer.parseInt(hex,16);
7+
System.out.println(decimal);
8+
}
9+
}

0 commit comments

Comments
 (0)