I want to convert a string value containing a number to an int type. However upon compilation I receive the following error "int can not be dereferenced" below is my code.
import java.io.*;
import java.lang.Object;
public class test{
public static void main(String args[])throws NumberFormatException{
String example="123";
int converted;
converted=converted.valueOf(example);
System.out.println(converted);
}//end of main
} //End of class
import java.io.*;
import java.lang.Object;
public class test{
public static void main(String args[])throws NumberFormatException{
String example="123";
int converted;
converted=converted.valueOf(example);
System.out.println(converted);
}//end of main
} //End of class