Do you have a code where I can see it?
Btw: If you want to replace x you should have a look into the StringBuilder class.
StringBuilder is mutable and contains a replace method.
If your intention is to parse a mathematical expression entered as a string and evaluate it then you will need to write an infix expression parser.
The "shunting yard algorithm" is an algorithm that can be used for this.
And which part of it is your wanted double value?
Sorry I am not so good in math ;)
But I guess you first need to split the String to separate each part of your function.
And than it should be possible to get your double value.
Yes that's right i separated intothe strings into char arr the i wantedvto replace the x variable by an interval or value so i tried to convert the interval which is double to string and store it on string but it only store the last value for instance 0.5 is my interval but it stores only 5