Problem with parsing String convertion to int in java
<p><strong>Please help me for conversion my line of codes are mention below:</strong></p>

<pre><code>String deptName = "IT";
String dept_test = request.getParameter("deptName").trim();
System.out.println("Dept name vlue is"+dept_test);
// problem here for casting...
int dept_id = Integer.parseInt(dept_test);
</code></pre>
