Boolean.getBoolean("true") returns false

I'm trying to make function that reads ini file. Why Boolean.getBoolean("true") returns false? How to use this conversation in correct way in java 1.4? Does it depends on system settings?


Boolean.getBoolean()'s argument expects the name of a system property. What you're looking for is Boolean.valueOf("true")


The method getBoolean takes a System Property name as an argument, not the String value of the boolean. What you need is probably Boolean.parseBoolean().