Skip to content

Instantly share code, notes, and snippets.

@PShchahelski
Last active August 29, 2015 14:03
Show Gist options
  • Save PShchahelski/8bd07c4606d88168e7d8 to your computer and use it in GitHub Desktop.
Save PShchahelski/8bd07c4606d88168e7d8 to your computer and use it in GitHub Desktop.

Revisions

  1. PShchahelski revised this gist Jun 25, 2014. 3 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  2. PShchahelski created this gist Jun 25, 2014.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    package com.test;

    public class ClassA {

    public ClassA() {
    System.out.println("ClassA()");
    method();
    }

    public void method() {
    System.out.println("ClassA.method()");
    }

    }
    24 changes: 24 additions & 0 deletions gistfile2.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    package com.test;

    public class ClassB extends ClassA {

    private static final Point POINT = new Point(0, 0);
    private final String mString = "Hello world";
    private final Point mPoint = new Point(1, 1);

    public ClassB() {
    super();
    System.out.println("ClassB(): " + POINT + " / " + mString + " / " + mPoint);
    }

    @Override
    public void method() {
    System.out.println("ClassB.method(): " + POINT + " / " + mString + " / " + mPoint);
    super.method();
    }

    public static void main(String[] args) {
    new ClassB();
    }

    }
    18 changes: 18 additions & 0 deletions gistfile3.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    package com.test;

    public class Point {

    public final int x;
    public final int y;

    public Point(int x, int y) {
    this.x = x;
    this.y = y;
    }

    @Override
    public String toString() {
    return "Point(" + x + ", " + y + ")";
    }

    }