Which Java method is used to detect the OS in which Java program is being run?

91. Which Java method is used to detect the OS in which Java program is being run?

  1. system.getOSdetails()
  2. system.get(os.name)
  3. system.getProperties("os.name")
  4. system.getProperties("os")

Answer: C) system.getProperties("os.name")

Explanation:

The Java method system.getProperties("os.name") is used to detect the OS in which Java program being run.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.