It has been on the news that certain businesses will not accept cash. They are mainly coffee shops and restaurants. New Jersey is trying to make it illegal for them to do so.
I agree. What if you had no forewarning? You finish eating, go to pay your bill, and you are then told you can't use cash. I'd just say I don't have any cards. Legal dine and dash.
I have to imagine that businesses that do not accept cash have such a posting in a prominent place - likely an entrance door - to prevent this from happening.