Skip to content

Commit

Permalink
7. Аннотация @OverRide;
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzor committed Nov 28, 2023
1 parent fa00ae0 commit 5625ab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/ru/j4j/inheritance/HtmlReport.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ru.j4j.inheritance;

public class HtmlReport extends TextReport {
@Override
public String generate(String name, String body) {
return "<h1>" + name + "</h1>"
+ "<br/>"
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ru/j4j/inheritance/JSONReport.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ru.j4j.inheritance;

public class JSONReport {
public class JSONReport extends TextReport {
@Override
public String generate(String name, String body) {
String ln = System.lineSeparator();
return String.format("{" + ln
Expand Down

0 comments on commit 5625ab8

Please sign in to comment.