COMP2396
Loading...
Searching...
No Matches
chapter7.abstracts Class Reference
Collaboration diagram for chapter7.abstracts:

Static Public Member Functions

static void main (String[] args)
 

Detailed Description

Definition at line 31 of file abstracts.java.

Member Function Documentation

◆ main()

static void chapter7.abstracts.main ( String[] args)
inlinestatic

Definition at line 37 of file abstracts.java.

37 {
38 animal[] a = new animal[10]; //support polymorphic array
39 //a[0] = new animal(); //error
40 a[0] = new dog();
41 a[0].mustbeoverriden();
42 a[1] = new cat();
43 final int x;
44 x=1;
45 System.out.println(x);
46 bruh b = new bruh();
47 System.out.println(b.x);
48 final int y;
49 {
50 y = 1;
51 System.out.println(y);
52 }
53 System.out.println(test.x);
54 test t = new test();
55 System.out.println(t.x);
56 Integer pp = 100;
57 System.out.println(pp);
58 }

The documentation for this class was generated from the following file: