you mean you assigned a string variable to your class and it accepted the string? I don't see that happening because you didn't define the operator = to do so and I don't see
jstring = b
anywhere in your code.

I see the opposite
b = jstring
which makes string class be assigned from your class and that is possible with the cast operator you have in your class

unless I am not understanding you. also please learn how to use the code tag. aka
Code:
code here