1. He hasn't been to Japan.

2. He ain't been to Japan.
(Is #2 an informal sentence. Is it correct?)

3. He has not a book.
4. He ain't a book.
(Is #4 an informal sentence. Is it correct?)

1 is correct.

2 is considered non-standard English and actually marks someone as probably illiterate!!

3 would be better written as this: He doesn't have a book.

4 is incorrect.