Thank you for the answer, but this logic does not satisfy me. What I mean is that with the same logic one could say the in the sentence "I do not have fish" fish is being acted upon and the sentence being negative makes no difference, so the fish should be in accusative: "У меня нет рыбу.". As far I understand though, in such a sentence the correct form should be genitive: "У меня нет рыбы.".
Could someone please clarify this for me? When does a negated sentence require the object to be in genitive?
The difference in your first example, though, is that grammatically the sentences are structured differently in both languages. "To have" in English is transitive and it takes a direct object, but in Russian there is no such transitive action and instead the idea is expressed with the (literal) translation as "By me no fish". Just bear in mind that cases and tense, etc., do not translate 100% between languages - what's prepositional in one might be expressed with dative in another, or one might require a nominative subject while the other might only imply a subject through verb conjugation.
Regarding negated transitive verb sentences in Russian, there's a good and simple post about it on this site: http://blogs.transparent.com/russian/accusative-and-genitive-in-negative-russian-sentences/ The long story short is that generally, tangible/concrete nouns (book, car, machine, etc.) will still be accusative even in a negated sentence (like in this one, where we're talking about fish), whereas abstract nouns (thoughts, ideas, proposals, etc.) will take genitive case. As that site points out, though, you still might encounter both cases.
I meant to say when children are capricious (don't want to eat), they can say Я не ем рыбы. it means that they don't eat any fish at all.
It makes two sense.
You have dinner and they serve fish, then you need to say Я не ем рыбу! (nominative) you talk about this fish dish.
You tell someone about your habits, in this case you need to say Я не ем рыбы! because you talk about many kinds of fish (genitive). Another version Я не ем рыб sounds odd.
Я не пью пива is the same.
But isn't that just what the sentence is saying: "I don't eat fish - ever, at all"
Given the exercise answer and your explanation, it seems like a matter of form rather than content: Use accusative for "I don't eat fish" and genitive for "I don't eat any fish" - but in English the mean the same thing. There is some subtle nuance of distinction in the English, and I suppose there is also that nuance in Russian, but to me it seems like a distinction without a difference.
@susanashe - Bear in mind that collective nouns in Russian still decline depending on their gender - feminine words ending in -a/-я will take an -у/-ю ending in the accusative regardless if it's collective or not.
In this case, рыба is actually not a collective in Russian like it is in English. A fish is рыба, many fish is рыбы.