What code should be added to the getColumnCount method in order to return the number of columns in the table?
class MyTableModel extends AbstractTableModel {
String[] columns = {"Employee Name" , "Job Title" , "Salary"};
Object[][] data = {{"Bob" , "Programmer" , 19000} , {"Alice" , "Programmer" , 19000}};
@Override
public int getRowCount() {
return data.length;
}
@Override
public int getColumnCount() {
______________________
}
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
return data[rowIndex][columnIndex];
}
}