Welcome to the Ranch
I have corrected your code tags; you can find out how to use them
here. I also got rid of some of the unnecessary blank lines, which don't enhance legibility. Lines like this are particularly difficult to read because of their length and lack of spaces between successive tokens:-
Your inconsistent indentation is because you are mixing spaces and tabs. Look at our
suggestions. Correcting those things will get you better marks and that is what you want
Do you know how to write arrays? If so, you could replace the several ifs in lines 33-43 with arrays and indices. You might pass the three guesses to one method call and get rid of the counter variable, as an alternative.