• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

octal and hexa representation

 
Argm Mastoi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Why do we need to use octal numbers' and hexa numbers' representation in java?
not clear with their usage and assignment too.
 
sabbir kazi
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may use the following syntax:
String DectoOct = Integer.toOctalString(Integer.parseInt(decimal));
String DectoHex = Integer.toHexString(Integer.parseInt(decimal));
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic