How do I pass kilogram, gram to a kilogram converter and obtain the result in grams (e.g. 5 kg 500 grams = 5500 grams) How to do this using javax.measure.* Refer over here Note: I need the solution only based on the above packages and not some generic solution Answer It’s a rather cumbersome API, but something like this? There’s