import javax.measure.Measurement;
import javax.measure.quantity.Length;
import javax.measure.unit.SI;
import tech.uom.se.quantity.Quantities;
public class UnitConversionExample {
public static void main(String[] args) {
Measurement<Length> length = Quantities.getQuantity(10, SI.METER);
Measurement<Length> lengthInCm = length.to(SI.CENTIMETER);
double valueInCm = lengthInCm.getValue();
String unit = lengthInCm.getUnit().toString();
System.out.println("Length in cm: " + valueInCm + " " + unit);
}
}