Aside from the previous answer, if you are visiting a friend or staying at their place, make sure to mention it to the embassy as you will definitely be asked this upon arrival. In Japan, you will be asked to fill in an immigration form which will include information such as purpose of visit, place of visit and similar. Additionally, you'll also fill in a custom's declaration at the customs. Be mindful that if you notify the embassy that you'll be visiting a friend, in some cases they may request a guarantee or invitation letter from the person you're visiting but this may be a case-by-case thing and it's better to check it with the embassy itself :)