In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The content of this article mainly focuses on how Java Integer gets the first and last place and intercepts it. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
Integer gets the first and last bits and intercepts the scene
Get 5, 10, 15, 25, 30; enter the judgment if the Mantissa is 5.
Public static void main (String [] args) {String str = "data test, custom field"; / / determine whether the first character is "if" (str.startsWith ("number")) {str = str.substring (1) } / / determine whether the last character is "segment" if (str.endsWith ("paragraph")) {str = str.substring (0 System.out.println str.length ()-1);} System.out.println (str);} ingenious method of calculating the number of Integer digits
Today, I found it interesting to see the java source code.
Final static int [] sizeTable = {9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 99999999, Integer.MAX_VALUE}; / / Requires positive x static int stringSize (int x) {for (int iTuno;; iTunes +) if (x
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.