Scrivendo questo programma
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class scrittura {
public static void main(String[] arguments) {
InputStreamReader reader = new InputStreamReader (System.in);
BufferedReader myInput = new BufferedReader (reader);
String str1 = new String ();
String str2 = new String ();
String str3 = new String ();
int gg = Integer.parseInt (str1);
int mm = Integer.parseInt (str1);
int aaaa = Integer.parseInt (str1);
System.out.println("Oggi è il: "+gg+mm+aaaa);
System.out.println("Giorno: "+gg);
System.out.println("Mese: "+mm );
System.out.println("Anno: "+aaaa );
}
}
mi viene questo errore
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Num berFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:504)
at java.lang.Integer.parseInt(Integer.java:527)
at scrittura.main(scrittura.java:13)
Process completed.
Mi dite perfavore cosa devo cambiare per far girare il programma

Rispondi quotando

