-5
How do I convert a value of type string
that needs to be stored in a variable that is of the type int
? Here are some conversion codes which are most appropriate to use in this conversion?
A.a = Integer.valueOf("10")
B.a = int.Parse("10")
C.a = Convert.Numeric("Macedo")
D.a = Convert.ToNumeric("10")
E.a = int.Convert.valueOf("Macedo")
Your doubt is not at all clear and the code presented does not make much sense regarding doubt. Please edit the question and be more specific about your doubt and the relationship to the code. Another tip is to always provide a [mcve] code.
– user28595
Ezar, welcome to [pt.so]! This is not Java. Please edit your question and add more information about the language, the version you are using and what you are trying to do, after all each conversion mode can have strengths and weaknesses. Hug!
– utluiz
Would that be what’s in that question here? Convert string to entire Java
– Bacco