Friday, 2 March 2018

java - method to convert from a string to an int











I am trying to write a method that returns an int from a String variable.
My method is:



public int returnInt(String s) {
}

Answer




You can use Integer.valueOf(String) for this


No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...