Home Ask Login Register

Developers Planet

Your answer is one click away!

Chinmay February 2016

I have a query in java

What does parseInt do exactly? Because my second argument was roll no. Which was not parsed but third argument was marks , which was parsed . Why so?

Answers


Just Code 007 February 2016

For ParseInt in Java script refer (http://www.w3schools.com/jsref/jsref_parseint.asp)


JJ72 February 2016

A String cannot be used like an int. With parseInt you can convert a string to an int.

public class Program {

public static void main(String[] args) {

String value = "1000";
// Parse with parseInt: the string can be negative.
int result = Integer.parseInt(value);
System.out.println(result);
System.out.println(result + 1);

Post Status

Asked in February 2016
Viewed 3,293 times
Voted 7
Answered 2 times

Search




Leave an answer


Quote of the day: live life