In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to create the Map of Scala". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to create the Map of Scala".
First, create a map. The default Map in the first line is immutable, and the second line is mutable.
Val map1 = Map ("bajie"-> 20, "wukong"-> "80", "wujing"-> 100)
Val map2 = scala.collection.mutable.Map ("bajie"-> 20, "wukong"-> "80", "wujing"-> 100)
Val map3 = new scala.collection.mutable.HashMap [String, Int]
Second, Map operation, find map1 ("bajie"), map1 ("bajie") = 30, and map1-= "bajie", map1 + = ("shifu"-> 1000)
Third, the iteration of map is 100 times simpler than that of java.
For (k, v)
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.