import java.util.Scanner; class Hovedprogram { public static void main(String[] args) { int a = 3; double b = 3.3; String c = "Hei"; char d = 'a'; int[] e = {1, 2, 3}; String[] f = {"hei", "hello"}; for(int i = 0; i < 10; i++) { System.out.println("Tallet er " + i); } for(int j : e) { System.out.println(j); } for(String j : f) { System.out.println(j); } while(a < 4) { System.out.println(a); a++; } Scanner scan = new Scanner(System.in); System.out.println("Hva heter du?") String inp = scan.next(); int inp2 = scan.nextInt(); double inp3 = scan.nextDouble(); String inp4 = scan.nextLine(); Person per = new Person("Per", "ski"); per.foo(); Person.teller } } class Person { String navn; String arg2; int id; static int teller; public Person(String arg1, String arg2) { navn = arg1; this.arg2 = arg2; id = teller; teller++; this.teller } public String foo(String bar) { return bar; } public void baa() { System.out.println("hei"); } }