Translation:I do not eat vegetables.
It can be used but your are talking about vegetables in general When you use は, you are talking about those spicific vegetables
Imagine you are having dinner with some people and you don't feel like eating vegetables right now, in this case you use は. But now imagine that you are vegan and don't eat meat at all, in this case you use を, because you don't eat meat at all.
At least that's what I've understood from the comments here.
I was always taught it is subject wa/ga object o verb. For example, watasi wa yasai o tabemasen. When the subject is left out of the sentance, it is always assumed the speaker is saying watasi wa, unless otherwise implied. By saying yasai wa tabemasen, it reads as if the vegetables don't eat.
は is the topic (a concept unique to Japanese) and が is the grammatical subject. When the topic and grammatical subject are the same, you only write は.
を is the object, but when the topic and object are the same, you only write は.
Without dropping any information, this sentence is actually やさいは わたしが 食べません The grammatical subject is still わたし, but by making やさい the topic, it makes it into a statement about vegetables as a whole as opposed to a specific instance of eating vegetables.
Your example sentence is correct, but it would mean "I will eat vegetables (in a second or soon)," as opposed to "I eat vegetables (in general)." When they use は instead of を, they're saying "...in general" or "of all things (because it also emphasizes specifically the preceding noun).
Vegetables is always plural unless you're referring to a specific type of vegetable.
I do not eat vegetables.
Potatoes are a vegetable.
Here, you would use "vegetables" since you're talking about the food group in general. If you were talking about a specific vegetable, you would probably just say "I don't eat that" or "I don't eat [potatoes, broccoli et cetera]".
(Feel free to correct my Japanese, by the way.)
In Japanese, there are root words to which you add suffixes to complete. For example, shimasu is to do. Shimasen is will not/ won't do (present or future). Shimasen deshita is did not do. Shimashita is did. These are all formal/polite suffixes. Shinai is the informal/direct version of won't do. Think of how you speak to a boss vs a close friend. Shinai is for those you are close with.
As you can see, this translates over to eat as well with tabe being eat. Tabemasu, tabemashita, tabemasen, tabemasen desita. Again, you can also use direct suffixes for those you are close to. Since we are talking about eating vs the act of doing, tabenai would be the appropriate informal response.
You will find some root words use different suffixes as you get further into Japanese.
Please forgive any spelling errors, and my succinct response, as I am on my cell.
Don't use Google like that, you can't translate specific words, your best bet would be to translate a whole sentence because words will change when fit into a full sentence, but even then Google can mess things up. There are also multiple ways of saying the same thing in Japanese, some ways are better than other in specific situations.
No, 野菜が食べません would not be correct, because vegetables would be the subject of the sentence, giving it a different meaning.
I don't eat vegetables.
I don't eat vegetables.
Vegetables don't eat.
More on は versus を above. I might be wrong about this, since I'm still learning.
Everyone! Take Duolingo's grammar with a grain of salt!
If you're actually wanting to learn, look it up on a trusted website or something. If you really want help, look up a grammar book called "A Dictionary Of Basic Japanese Grammar" by Japan Times. That is an extremely good rescource for anyone who wants to learn Japanese. It has all the basic and actually used grammar principles, explanations of all the particles, tons of practice examples and more...
The をis just a particle and that particle, from all the info I can find, is an object particle. So its used for objects and the は is a topic particle. It tends to be difficult when to use these particles in a sentence but then do not change the outcome quite often. The ません is a negative conjugate which would mean, "not or don't." And a normal ます would just be assumed for,"do or I do."
Heres and example if place for placement of those particles if it helps:
わたしはやさいをたべます。 I do eat vegetables.
わたしはやさいをたべません I don't eat vegetables
And the やさいをたべません Would mean, "vegetables do not eat," this form of sentence in most cases will be assumed that you/yourself is the one who doesn't eat vegetables.
I hope i could help.