summaryrefslogtreecommitdiffstats
path: root/voronoi/Classtest.java
diff options
context:
space:
mode:
authorRichard Zahoransky2011-11-07 16:29:56 +0100
committerRichard Zahoransky2011-11-07 16:29:56 +0100
commit08d5f7b0a0b24c042aa5976f66bf3a1b5b754478 (patch)
treeba5388774100c1b218cb264927c3bb3669fd7e06 /voronoi/Classtest.java
parentinit (diff)
downloadlocalization-08d5f7b0a0b24c042aa5976f66bf3a1b5b754478.tar.gz
localization-08d5f7b0a0b24c042aa5976f66bf3a1b5b754478.tar.xz
localization-08d5f7b0a0b24c042aa5976f66bf3a1b5b754478.zip
Localization Code. How-To will follow...
Diffstat (limited to 'voronoi/Classtest.java')
-rw-r--r--voronoi/Classtest.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/voronoi/Classtest.java b/voronoi/Classtest.java
new file mode 100644
index 0000000..9f13fde
--- /dev/null
+++ b/voronoi/Classtest.java
@@ -0,0 +1,36 @@
+package voronoi;
+class Parent {
+ public Parent() {
+
+ }
+}
+
+class Child extends Parent {
+ public Child() {
+ super();
+ }
+}
+
+public class Classtest {
+ public static void main(String[] a) {
+ Parent[] test = new Parent[3];
+ test[0] = new Parent();
+ test[1] = new Parent();
+ test[2] = new Child();
+
+ int count = 0;
+ for (Parent parent : test) {
+ System.out.print("Index " + count + " is of type: ");
+ if (parent instanceof Child) {
+ System.out.println("Children");
+ }
+ if (parent instanceof Parent) {
+ System.out.println("Parent");
+ }
+
+ count++;
+
+ }
+
+ }
+}