Very recently at Dar es Salaam airport I paid my Visa by credit card and by Euro. Other airports may still insist on cash, and cash only in US $ and in new banknotes in reasonable condition.
ATMs are ubiquitous and operate 24/7. The local currency is convertible. There is no more black market exchange rate and no more hyperinflation. You don't get better value when paying or tipping in american dollars, cigarettes or chewing gum. Hence there is no point to bring dollars or traveller checks. Banks have limited hours, i.e. Monday tp Friday 9:00-16:00 minus lunchtime break and apply a lot of bureaucracy, i.e. photocopy passport, fill out forms, enter data into computer etc..
For ultimate flexibility and longer stays get a local SIM card and register with M-PESA, a payment service via mobile phones which is popular in the entire region.