how to pass a float between activities in android studio

Java
Intent A2 = getIntent();
        float Value = A2.getFloatExtra("rMainValue", 0);
 
        EditText mainResistorValue = (EditText)findViewById(R.id.upperToleranceValue);
 
        mainResistorValue.setText(Float.toString(Value));

Source

Also in Java: