Java程序显示句子中的所有单词,其中包含字母“a” [英] Java program to display all word in the sentence with the alphabet 'a' in them

查看:237
本文介绍了Java程序显示句子中的所有单词,其中包含字母“a”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们今天进行了一次测试,我准备好了,但这是我唯一的错误,有人可以帮我这个吗????



我尝试了什么:



今天我们进行了一次测试,我准备好了,但这是我唯一的错误,任何人都可以请帮我这个????

We had a comp test today and i prepared hard but this is the only thing i got wrong, can anyone please help me with this????

What I have tried:

We had a comp test today and i prepared hard but this is the only thing i got wrong, can anyone please help me with this????

推荐答案

不,因为你没有向我们展示你做过的任何事情,我们不在这里做你的功课:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



这不是一个复杂的程序:它很简单循环识别单词开始和结束,并识别其中的单个字符。亲自尝试一下,你可能会发现它并不像你想象的那么困难!



如果你遇到一个具体的问题,那么请询问一下,我们会尽力而为帮助。但我们不打算为你做这一切!
No, because you haven't shown us anything you have done, and we aren't here to do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

This is not a complicated program: it's a simple loop spotting word starts and ends, and identifying a single character within them. Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


字符串 [ ^ ]类提供您所需要的一切。例如,看一下 split indexOf 方法。
The String[^] class provides all you need. Have a look, for instance, at split and indexOf methods.


这篇关于Java程序显示句子中的所有单词,其中包含字母“a”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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