لماذا غالبا ما يستخدم الكتابة المطبوعة مع FileOutPttream عندما يمكنني فقط استخدام طريقة الطباعة

StackOverflow https://stackoverflow.com/questions/9528536

سؤال

إذا استطعت القيام بذلك: giveacodicetagpre.

لماذا غالبا ما يستخدم PW مثل هذا: giveacodicetagpre.

ما هو الفرق؟

هل كانت مفيدة؟

المحلول

The PrintWriter constructors that accept a file name or a java.io.File are relatively new; they were added in JDK 1.5. The FileOutputStream or FileWriter version used to be the only alternative; a lot of people don't even know about the new constructors in PrintWriter.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top