In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Public class StringTest {public static void main (String [] args) {/ / 1 String S1 = "abc"; / / 2 String S2 = new String ("cdg"); / / 3 byte [] bytes= {98 new String (bytes); String S3 = new String (bytes); / / 4String (byte [] bytes, int offset, int length) Constructs a new String by decoding the specified subarray of bytes using the platform's default charse String S4 = new String (bytes,1,3); / / 5. Char [] C1 = {'I', 'Shi', 'Zhong', 'Guo', 'Ren'}; String S5 = new String (C1); System.out.println (S5); / / I am Chinese / / 6. String S6 = new String (c1jue 2); System.out.println (S6) / / China System.out.println (S3); / / abcd String has rewritten toString}} / * common string methods in Object * / public class StringTest06 {public static void main (String [] args) {/ / 1.char charAt (int index); String S1 = "I am Wang Yong, the bad guy!" ; char C1 = s1.charAt (2); System.out.println (C1); / / Wang / / 2.boolean endsWith (String endStr); System.out.println ("HelloWorld.java" .endsWith ("java")); / / true System.out.println ("HelloWorld.java" .endsWith (".java")) / / true System.out.println ("HelloWorld.java" .endsWith ("HelloWorld.java")); / / true System.out.println ("HelloWorld.java" .endsWith ("txt")); / / false System.out.println ("HelloWorld.java" .endsWith ("java")) / / false / / 3. Boolean equalsIgnoreCase (String anotherString); System.out.println ("abc" .equals IgnoreCase ("ABc")); / / true / / 4.byte [] getBytes (); byte [] bytes = "abc" .getBytes (); for (int iSignoreCase)
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
1. Multi-statement table-valued function-- =-- Author:-- Create date:-- De
© 2024 shulou.com SLNews company. All rights reserved.