Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  1 minute, 42 secondsDe ikke objekt-orienterede dele af Java - slide 34 : 39

Output i Java 

Output besørges ved at kalde print eller printlnout i System klassen
 

 

class IoDemo1 {

public static void main(String[] args){

  int i = 1; double d = 1.1 ; boolean b = true ; char c = 'a'; 

  System.out.println("En streng");
  System.out.print("i = " + i + ". ");
  System.out.print("d = " + d + ". ");
  System.out.print("b = " + b + ". ");
  System.out.print("c = " + c + ". "); 
  }

}