如何将字符串数组写入文件 [英] How to write string array to a file

查看:441
本文介绍了如何将字符串数组写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我对Java还是很陌生,我非常需要一个示例代码,该示例代码将数组中包含的字符串数据写入文本文件.我已经创建了一个数组,其中包含各大洲的名称,但是我不知道如何将数据写入文件.代码示例会有所帮助.

在此先感谢

hello guys, i am quite new to java and i am in great need of a sample code that writes string data contained within an array to a text file. i have already created an array and it contains names of continents but i don''t know how to write that data to a file. a code sample would help.

thanks in advance

推荐答案

这将有助于您自己完成家庭作业.如果您的代码有问题,我们将为您提供帮助-但必须是您的代码而不是我们的代码.
It would help to do the homework by yourself. We will help you if you''ve got a problem with your code - but it has to be your code and not ours.


看看
Take a look at this tutorial[^], which is surprisingly easy to find. A little bit of link tracking should also help you to understand arrays. Given both subjects the answer should be fairly easy to figure out.


这篇关于如何将字符串数组写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆