Since the variables are single lower-case letters, you can initialize your disjoint set arrays with 26 elements. Then, take a pass through the equations, and for all equations of the form "x==y", find x and y, and if their set id's differ, then union them.
Then take a second pass through the equations, and for all equations of the form "x!=y", find x and y, and if their set id's are the same, then return false. When you're done, return true.
This is a good time to solidify your understanding of the data structure -- don't copy/paste or use code from the lecture notes. Just put a links array and a sizes array into the Solution class, and write Union() and Find() on your own (implement Union-By-Size). Each one is only a few lines, and it will help you internalize that data structure!