Skip to content

Commit

Permalink
Override and change dependency class
Browse files Browse the repository at this point in the history
  • Loading branch information
marecabo committed Apr 18, 2024
1 parent e4706d5 commit 40bb99b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/com/project/my/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public class Main {
public static void main(String args[]) {

Table table = Table.create("Hello World");

// We changed the table.toString() method to return twice the output, see
// Relation.java
System.out.println(table.toString());

}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/tech/tablesaw/table/Relation.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ public int[] colWidths() {
*/
@Override
public String toString() {
return print();
String result = print();
result = result + "\n" + result;
return result; // ! place breakpoint here and debug Main.java
}

/** Returns a 'pretty-printed' string representation of this entire relation. */
Expand Down

0 comments on commit 40bb99b

Please sign in to comment.