Ask Your Question
3

Could systemProperty values also include numbers and booleans, other than just strings?

asked 2021-09-27 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-02-02 05:00:00 +0000

devzero gravatar image

Yes, systemProperty values can include numbers and booleans, not just limited to strings. However, when retrieving systemProperty values in Java, they are always of type String, so you need to parse them to their correct datatype. For example, to parse a systemProperty value to an integer in Java, you can use the Integer.parseInt() method, and to parse it to a boolean, you can use Boolean.parseBoolean() method.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-09-27 11:00:00 +0000

Seen: 8 times

Last updated: Feb 02 '23