java中的字符串和键盘输入
我需要编写一个 Java 程序,它从键盘读取一个字符串,然后报告字母表中的每个字母在该字符串中出现的次数(忽略大小写)。它还应该报告字符串中包含多少个非字母。
但我什至不知道从哪里开始,
如果有人愿意为我编写这个程序和/或引导我一步步完成它,我将非常感激。哎呀,如果有人只是写了这个程序,我愿意付钱(而且我可以 - 给我发电子邮件了解详细信息)
I need to write a Java program which reads in a string from the keyboard and then reports how many times each letter of the alphabet occurs within that string (ignoring case). It should also report how many non-letters are included in the string.
but I don't even know where to begin
if someone is willing to write this program for me and/or take me through it step by step I would be very grateful. Heck if someone just wrote the program for be I would be willing to pay (and I can- email me for details)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Stack Overflow 不是一个你应该要求人们为你做作业的地方,还有其他网站可以做到这一点。
我可以回答你的问题,就像这里的许多其他人一样,但如果你要学习如何编程,你最好自己做作业。
如果您不知道从哪里开始,请查看这些网站:
小写:
download.oracle.com/javase/1.3/docs/api/java/lang/String.html#toLowerCase(java.util.Locale)
遍历字符:
download.oracle.com/javase/1.3/docs/api/java/text/StringCharacterIterator.html
http://www.exampledepot.com/egs/java.text/StrIter.html
Stack overflow is not a place where you should ask people to do your homework for you, there are other websites for that.
I could answer your question, as many other people here could, but if you're ever going to learn how to program you'd better do your homework yourself.
If you can't figure out where to begin, check out these websites:
lower casing:
download.oracle.com/javase/1.3/docs/api/java/lang/String.html#toLowerCase(java.util.Locale)
going over characters:
download.oracle.com/javase/1.3/docs/api/java/text/StringCharacterIterator.html
http://www.exampledepot.com/egs/java.text/StrIter.html
就这样。
There you go.