Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes fetch in integer variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "fetch in integer variable" Watch "fetch in integer variable" New topic
Author

fetch in integer variable

Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 225

how to fetch following string array into integer array


i am doing like following


but it is giving compile time error.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
try this:
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4392
    
    8

Integer.parseInt takes a String as the argument, but you're passing it a String array.

To convert an array of Strings into an array of ints, you need to create the int array of the right size, then loop round the arrays converting each individual String to an int.
Athira Vineeth
Greenhorn

Joined: Sep 06, 2010
Posts: 16
Hi,

Try this


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: fetch in integer variable