public class TestProgram { public static void main(String[] args) { Student stud = new Student(); Person pers = new Person(); if (stud instanceof Person) { System.out.println("Funket"); } else { System.out.println("Funket ikke"); } } }