how are foreigners treated in Japan?

How are foreigners treated in Tokyo, and Japan as a whole? I am a Hispanic planning on studying abroad in Japan but curious how foreigners are treated there. By the time I will be going (not yet) I would have 2 years time grasping the language so hopefully I won't be completely confused when I go. So how would I be treated in Japan and what sort of first thoughts would people think seeing me at first if any?

I aimed to stay in Japan for 1 year and return back to my home in London....Ive been here for 3 years now and I dont want to go back. Japan is one of the best countries to live in and if you are a foreigner, you are more likely to get treated better that the natives which is quite sad as there are many foreigners who abuse Japanese hospitality and good graces. Their mentality and work ethic is amazing and the west can learn so much from them. If you havn't gone yet go and experience this awesome and beautiful country!

I have been living in Japan for three years and I really dont want to leave but have to. There is so much to see and do in Japan. Climate is awesome and consistent, the people are so nice, helpful and caring and are so willing to go out of their way just to help you. If you haven't been yet..GO!!

I think being a white, foreign female in Tokyo is very easy - people are very caring in and helpful. I have one of my friends from Kenya who always complains about being stopped by police officers or glared at. I think it depends on the way you look, dress, and act (as well as your gender).

I've never really had any problems, but I think everyone is different.