Skip to content

Commit

Permalink
11b - java intro
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Benov committed Oct 9, 2023
1 parent c484ad9 commit b26f91c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

target
target
*.class
*.out
10 changes: 10 additions & 0 deletions materials/2023-2024/11b/2023-10-09-java-intro/Bar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Bar extends Foo {
@Override
public void print() {
System.out.println("Hello Bar");
}

public void baz() {
// ...
}
}
5 changes: 5 additions & 0 deletions materials/2023-2024/11b/2023-10-09-java-intro/Foo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Foo {
public void print() {
System.out.println("Hello");
}
}
11 changes: 11 additions & 0 deletions materials/2023-2024/11b/2023-10-09-java-intro/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Main {
public static void main(String[] args) {
Foo foo = new Foo();
Foo foo2 = new Foo();

foo.print();

Foo bar = new Bar();
bar.print();
}
}

0 comments on commit b26f91c

Please sign in to comment.