Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'        next  Play sound for this slide -- Keyboard shortcut: 'y'  IoDemo2.java - Eksempler på anvendelse af input kommandoer fra klassen Console.Lecture 3 - slide 35 : 39
Program 1

import oopcourse.util.Console;

class IoDemo2 {

public static void main(String[] args){

  System.out.println("Console Demo");

  int i; double d ; String s;

  i = Console.readInt("Indlæs et heltal: ");
  d = Console.readDouble("Indlæs et reelt tal: ");
  s = Console.readString("Indlæs en tekststreng: "); 

  System.out.print("i = " + i + ". ");
  System.out.print("d = " + d + ". ");
  System.out.print("s = " + s + ". ");

  }

}