Skip to content
CodeKruPro

Reading values from a Properties object

QuizEasy-MediumJava onlyAsked in: Infosys

config.properties holds:

browser=chrome
# comment
url = https://example.com
timeout=10

After config.load(reader), which statements are true? Pick all that apply.

  • config.getProperty("url") is "https://example.com"
  • config.getProperty("missing") throws an exception
  • config.getProperty("missing", "dflt") is "dflt"
  • config.getProperty("timeout") returns the number 10 as an int

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in