Code Room
Code reviewMedium
Question
Review this Java code that parses a price string from a form post.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
import java.text.NumberFormat; double parsePrice(String s) throws Exception { NumberFormat nf = NumberFormat.getInstance(); // default locale return nf.parse(s).doubleValue();} // parsePrice("1.234") on a de-DE serverRun or narrate your approach, then ask the coach.