It might be relevant here to comment briefly on the subject of samurai literacy. All samurai were encouraged to study the Confucian classics; and although many achieved only the sketchiest knowledge of them, most had an education of sorts and some became scholars of great repute. Certainly the society in which they lived set a great value on books and learning, so that their opportunities for reading were considerable. The technique of printing, which had been brought to Japan from China in very early times, was much improved by the use of movable type, learnt from both Europe and Korea at the end of the sixteenth century; and this helped to bring about a great increase in the number of books available. They were soon being printed not only by the Tokugawa and domain governments, but also by commercial booksellers, now emerging for the first time in the great cities. The libraries of feudal lords, usually open to samurai of their domains, were numerous and often large, while the poorer samurai and merchants were in a position as a rule to borrow books from their more affluent friends and neighbours. Even residents of the countryside were able to read the more popular works, by borrowing them from itinerant pedlars for a fee.