I want to make a game that helps me understand the essence, but I need to convert it to compare the answers to the questions. I can implement it myself, but if there is a method supported by Java, it will be better I'd like to use that, but is there a method to help me transform the essence?
hex java binary decimal-number
The Integer class contains methods that support these features. There are toBinaryString, toOctalString, toHexString. A method that, as the name implies, replaces binary, octal, and hexadecimal numbers.
Integer.toBinaryString(10); If you insert int-type data into the parameter in this way, it returns a binary string. Conversely, if you use Integer.valueOf;, you can use a string that is included in the first parameter for the second parameter Change it to the appropriate integer and return it to int type.
© 2024 OneMinuteCode. All rights reserved.