Try the following code:
public class FirstInput
{
public static void main (String args [])
{
new FirstInput ();
}
public FirstInput ()
{
System.out.println ("W E L C O M E");
System.out.println ("");
int a = IBIO.inputInt ("Input a number >> ");
System.out.println ("You have entered " + a + ".");
System.out.println ("");
String name = IBIO.inputString ("Type your name >> ");
System.out.println ("The name you entered is " + name + ".");
}
}
This code has a couple of new things in it.
| Declare a variable to hold input | int age; |
| Get input | age = IBIO.inputInt("Enter your age: "); |
| Print out a variable (Note the + sign between the string and the variable) | System.out.println("Your age is" +age); |