public static void main(String[] args) {
//Declaração das variaveis.
int j=0, i;
float u, thresh;
String inputthresh = null, inputw1 = null , inputw2 = null, inputx1 = null, inputx2 = null;
//Declaração das arrays.
float w1[]= new float[2];
float w2[]= new float[2];
float x1[]= new float[2];
float x2[]= new float[2];
//Recebendo os valores de threshold, w1, w2.
inputthresh = JOptionPane.showInputDialog(null,null,"Entre com o threshold",1);
thresh = Float.valueOf(inputthresh)"ERRADO";
gostaria de converter esta String (inputthresh) para a variavel do tipo float.