在java中打印文本文件引号内的一行
我正在尝试打印文件中引号内的文本。愿有人能帮助我吗?
例如:“Jayaramachandiran”
这一行位于文本文件中,我想阅读并打印它。
I'm trying to print the text within the quotes in a file. May I have anyone to help me.
E.g : "Jayaramachandiran"
This line is in a text file,and I wanna read it and print it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么不查看此链接:
如何从文件内容创建 Java 字符串?
似乎有人已经回答了您的问题。 :)
该问题的第一个答案是您最好的选择。
PS 将文件读入字符串后,继续输出字符串,瞧!
Why don't you check out this link:
How do I create a Java string from the contents of a file?
It seems someone has answered your question already. :)
The first answer to that question is your best bet.
P.S After reading the file into a string, just go ahead and output the string and voila!
您可以使用 BufferedReader 来读取。
看这个例子:
You may use a BufferedReader to read.
See this example:
您想要从文件中打印一个字符串,但从中删除字符(例如引号)。
我认为最好先从文件中读取字符串,然后删除引号。
检查此页面。
You want to print a string from file, but removing characters, like the quotes, from it.
I think it's better first to read the string from file, then remove the quotes.
Check this page.