helpppppp how do i convert primitives in a string to int
here s my code i ve got the numbers i grabed them in a string if their s another way plz tell me its driveing me nuts
public class readingfiles2 extends Applet
{
int dumyvar = 0;
String dumystring = " ";
public void init()
{
try{
URL url = new URL(getCodeBase(), "Myvectors.txt");
InputStream instream = url.openStream();
BufferedReader in = new BufferedReader(new InputStreamReader(instream));
dumystring = in.readLine();
dumyvar = (Integer)dumystring;//this doesnt work
}
catch(IOException e){}
}
public void paint(Graphics g)
{
g.drawString(" the int "+dumyvar,30,30);
g.drawString(" the str "+dumystring,30,50);
}
}

