Java uses the parseint () method in the integer class to convert a string to a base data type

Source: Internet
Author: User

Import java.util.*;p ublic class systeminfo{public static void Main (string[] args) {Properties sp = System.        GetProperties ();        Enumeration E = Sp.propertynames ();               while (E.hasmoreelements ()) {string key = (string) e.nextelement ();         System.out.println (key+ "=" +sp.getproperty (key)); }    }}

Operation Result:


"C:\Program Files\java\jdk1.8.0_144\bin\java" "-javaagent:c:\program Files\jetbrains\intellij idea 2017.2.2\lib\ Idea_rt.jar=62849:c:\program Files\jetbrains\intellij idea 2017.2.2\bin "-dfile.encoding=utf-8-classpath" c \ Program Files\java\jdk1.8.0_144\jre\lib\charsets.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\deploy.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\access-bridge-64.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\cldrdata.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\dnsns.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\jaccess.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\jfxrt.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\localedata.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\nashorn.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\sunec.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\sunjce_provider.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\sunmscapi.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\ext\sunpkcs11.jar; C +Program Files\java\jdk1.8.0_144\jre\lib\ext\zipfs.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\javaws.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\jce.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\jfr.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\jfxswt.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\jsse.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\management-agent.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\plugin.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\resources.jar; C:\Program Files\java\jdk1.8.0_144\jre\lib\rt.jar; C:\Users\lenovo\IdeaProjects\TestIntegerDemo\out\production\TestIntegerDemo "Main

Hello world!

124


Process finished with exit code 0


This article is from the "enjoy the Joy of Technology" blog, please be sure to keep this source http://liam2199.blog.51cto.com/2879872/1959257

Java uses the parseint () method in the integer class to convert a string to a base data type

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.