Japan is a cash society.  Luckily, it is the safest country in the world so it's okay to carry large amounts of cash with you at all times without the worry of being mugged or held up.  Generally there is no need to buy Japanese yen in your home country before your trip, as you will most likely pay a higher commission (about 3%) and a worse exchange rate than you would get at the airports, banks, or ATMs in Japan.

There are three ways to obtain yen in Japan for approximately 1% cost.  The first way is to exchange travelers checks (in well-known currencies such as dollars, euros, pounds, etc.) at a foreign exchange counter at a bank.  International airports also have these counters just outside of immigration inside of the arrivals lobbies.  The second way to obtain yen for a 1% fee is via a post office ATM.  These are available in most (maybe all) Post Offices. They are often accessible in a foyer even when the Post Office is closed. See this link for more information.  The third way is to find a JUSCO store (big grocery and department store all in one).  There are several money exchange machines (dollars to yen) just inside on the first floor.  You get the going rate for yen and yall you have to do is feed your dollars in and yen comes out.  You can change anything from $20 up.

(Hint: Many machines issue bills of 1,000 and 10,000 yen. If you prefer to have some smaller bills, withdraw an amount such as 19,000 Y for 9 x 1,000 Y notes instead of 2 x 10,000 notes by withdrawing 20,000 Y. But I never had an issue with any merchant breaking a large bill for a small amount, as happens elsewhere.)

Credit cards are accepted at major hotels and larger restaurants.  Small business hotels and small restaurants generally do not accept credit cards.  The credit card company will charge a fee on your bill for foreign exchange (usually 1-3%). 

Foreign currency and foreign travelers checks are not accepted anywhere in Japan except on certain U.S. military bases and facilities.