9.6 About string,"I am a teacher",这个字符串中有多少个字,且分别把每个字打印出来. /*本题的思路就是,当我有一个字符串,我需要一个一个字符的处理,当下一个字符是个空格的时候,我就知道前面已 经构成了一个完整的字,把它输出出来就好了.如果发现下一个字符不是一个空格的话,我就把这个字符,加到另一个字符串中,逐渐积累那个字符串成为一个完整 的字.*/ public class Test { static int amount_space = 0;…
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code name=['燃灯古佛','释迦摩尼佛','弥勒佛'] for item in name: print(item) 2 show ------------------------------------------博文的精髓,在技术部分,更在镇场一诗.Python是优秀的语言,值得努…
public int strStr(String haystack, String needle) { if(haystack == null || needle == null) { return -1; } for (int i = 0; i <= (haystack.length()-needle.length()); i++) { int m = i; for (int j = 0; j < needle.length(); j++) { if (needle.charAt(j) ==…