I don't think your class 1 is experiencing any dirty reads. Its the regular behavior. You establish a DB session the moment you open a connection. Within the session all uncommitted changes are readable. Since you have autoCommit = false, the moment you close your connection the insert would be rolled back and any further select from class1 will/should show only 3 records on the emp table.
Your class 2 sees only 3 records since class 1 has not committed the records yet. Thus the class2 (which has a separate DB session) is not experiencing the dirty read.