JAVA經常使用的一些技巧(提升程序效率)

1.當須要首字母大寫時web String str= "HbcdefggGG"; byte[] bytes = str.getBytes(); //ASCII碼中,a-z對應97-122,而A-Z對應65-90; if (bytes[0] >= 97) { bytes[0] -= 32; } 點評:此方法能夠節
相關文章
相關標籤/搜索