I cannot for whatever reason I am not doing the escape correctly. so this is what ive come up with. the output looks correct but still not verifying please help
package com.codegym.task.task19.task1901;
/*
TableAdapter
*/
public class Solution {
public static void main(String[] args) {
ATable aTable = new ATable() {
@Override
public String getCurrentUserName() {
return "Amigo";
}
@Override
public String getTableName() {
return "DashboardTable";
}
};
BTable table = new TableAdapter(aTable);
System.out.println(table.getHeaderText());
}
public static class TableAdapter implements BTable{
private ATable aTable;
public TableAdapter (ATable aTable1){
this.aTable = aTable1;
}
@Override
public String getHeaderText(){
char ch = '"';
return "\"["+ aTable.getCurrentUserName()+"]: " + aTable.getTableName()+ch;
}
}
public interface ATable {
String getCurrentUserName();
String getTableName();
}
public interface BTable {
String getHeaderText();
}
}