I think the most helpful substitution for “resist” in this sense of the word would be “successfully repel” or “fight off”, so let's apply that to your first sentence:
I can[not] [fight off] not to eat apples.
Well, that doesn't sound right, so let's fix the double-negative:
I can't [fight off] to eat apples.
Still not perfect. Let's talk about what you're actually fighting off. If someone asked what exactly it was that you couldn't fight off, you wouldn't answer “to eat apples”, you'd indicate the eating of the apples or the apples themselves as the "unrepellable" thing. Let's try those:
I can't [fight off] eating apples. → or → I can't resist eating apples.
I can't [fight off] apples. → or → I can't resist apples.
Much better! The only slight problem is that all of the above requires an understanding on the part of the listener that apples represent a strong temptation. Technically, you are resisting the urge to eat apples. In fact it's probably always best to make sure that your use of “resist” corresponds with a force or urge.
I can't resist to see you.
In this case, you are using “see” to describe the act of looking at someone. This is not idiomatic. Because “see” is such a general term, it is normally reserved for the most basic sense of being able to perceive something with your eyes or not. For example, in the expression “I can't wait to see you”, which you might say to someone you're expecting to visit you soon, “see” works because it marks the limit between zero visibility (the other person is elsewhere) and the requisite proximity for basic perception.
So let's try using “look at”, like you did in your explanation:
I can't resist to look at you.
Still doesn't work, because “to look at you” isn't the noun or noun phrase that “resist” requires in its current function as a transitive verb. The appropriate noun phrase would be “(the act of) looking at you”, or even more clearly “the urge to look at you”. Again, it's the urge that's the important piece of the “resist” puzzle.
That gives us:
I can't resist looking at you.
I can't resist the urge to look at you.
The above is grammatically correct, but it's still hyperbole. Since “can” generally represents a boundary of possibility sometimes it's used this way, to exaggerate a difficulty to the point of making something impossible, but obviously that's not technically the case so if you wanted a less dramatic statement you could say:
It's difficult for me to resist the urge to look at you.
And since this looking is therefore likely to be extended, you could say:
It's hard not to stare (at you).
This final example also has the advantage of capturing the other side of this struggle, because the verb “stare” tends to indicate a rudeness (such as that from which you're struggling to refrain).
Your question:
Is it really grammatically correct to say what kind of an animal instead of what kind of animal...?
Yes, it is. It is possible to keep an, though it's fair that you'd expect it dropped because it's usually dropped. Then again, it's quite obvious that his writing style is informal.
This entry of Practical English Usage by Michael Swan should help explain why both alternatives (with or without a/an) are possible.
551 sort of, kind of and type of
1 articles
The article a/an is usually dropped after sort of, kind of and type of, but structures with articles are possible in an informal style.
That's a funny sort of (a) car.
What sort of (a) bird is that?
So, if it were:
If you already know what kind of animal Java is and know that you want to use Java, skip Chapter 1 and go straight to Chapter 2. Believe me, I won’t mind.
would the meaning be different?
Not at all (to put it simply), because in his usage, what kind of animal would mean the same thing as his what kind of an animal.
Best Answer
The difference is that word can be removed is a passive voice structure. But that word to remove sounds grammatically wrong. Instead, I can say, This word is difficult to remove, It's amazing to learn, It's difficult to learn, It's too close to handle.....etc here the to+Vinf. post-modifies the adjective phrase.