Till 20th century, Japanese were living in house, apartment, condominium or dormitory. Then, sharing a residence with friends or unknown persons was unusual.
However now room sharing and living in a shared-residence is popular. Then, the residents at shared-residence are not only young people but also elder ages in 40s and 50s. Also there are a lot of foreigners living in shared-residence too.
Shared-residence is a multi-story single building and residents pay fixed rent including utility costs. If you are planning to stay in Japan for a long period, more half a year, shared-residence is a good choice.