title: resolving java.lang.String cannot be cast to java.lang.Boolean
body: <p>I'm still new in programming. Currently, I have a program that checks the attendance of an employee. The employee id &amp; names are retrieved from a database. The daily attendance of an employee is saved in an attendance table in the database, with fields having only an ID,empID,dateAttended,"present","overtime". Now, I want to retrieve all the values from the attendance table. At first, I can retrieve the values fine but after I added the "a.dateAttended" and "a.Present", I get this Exception. Any suggestions on how i can resolve this?</p>
  
  <pre><code>private void attendanceView(){
      try{
          String query ="SELECT e.ID,e.firstName,e.lastName,e.position,a.dateAttended,a.Present FROM employees e INNER JOIN attendance a ON e.ID=a.empID";
          Object[][] result = connectToDB(query);
  
          attendanceTable.setModel(new javax.swing.table.DefaultTableModel(
              result, new String [] {"Employee ID","First Name","Last Name", "Position", "Date", "Present"}
          ) 
          {
              Class[] types = new Class [] {
                  java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class
              };
              boolean[] canEdit = new boolean [] {
                  false, false, false, false, false, true
              };
  
              public Class getColumnClass(int columnIndex) {
                  return types [columnIndex];
              }
  
              public boolean isCellEditable(int rowIndex, int columnIndex) {
  
                  return canEdit [columnIndex];
              }
          });   
          }catch (ClassNotFoundException ex) {
              Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
          } 
  }
  </code></pre>