update firstprog.java

declared int a and added the console ability