Grepper Logo

Mini Convert library in Java


This code helps you convert in an easy way the primitive types in Java

the library contains:

- Convert class with the methods to convert your types

- BaseConverter class with the method convertBase that always returns a string of the number in the base you select*

  • I descourage using the Base Converter class because I coded it specifically for one small project, and doesn't support decimal and/or negative numbers.

Anyways, the code is this:

primitive types conversion

numeric base conversion

the complete "library" is this:


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.