No. It often produced code that referenced non existing packages or classes that conveniently would solve the problem if they only existed, but the code would otherwise compile.
Not gibberish but definitely I had quite a few back and forth where he would apologize for getting stuff incorrect, try to correct itself and sometimes be wrong again (in that case you can get into a loop where he alternates between two wrong answers). It was not gibberish just code that did not work (either at all or as intended) for various reasons. So I would call it buggy, not gibberish.<p>Worth noting it was ChatGPT 3.5 so maybe this is less of an issue now.
It helps to ask it to first split the implementation into a plan and then to ask to implement each step individually. Also, it is faster to fix tiny errors on your own instead of leading it into it. Sometimes it also helps to redo the full process with a good task definition and requirements list. The code isn't ideal but it could be more inspirational than an empty editor when starting something new.