583). Which object Java application uses to create a new process?

[A]Process
[B]Builder
[C]ProcessBuilder
[D]CreateBuilder

Show Answer

584). Which of the following is true about Java system properties?

[A]Java system properties are accessible by any process
[B] Java system properties are accessible by processes they are added to
[C]Java system properties are retrieved by System.getenv()
[D]Java system properties are set by System.setenv()

Show Answer

585). Java system properties can be set at runtime.

[A]True
[B]False
[C]none
[D]none

Show Answer

587). What does System.getProperty(“variable”) return?

[A]compilation error
[B]value stored in variable
[C]runtime error
[D]null

Show Answer

588). What is true about the setProperties method?

[A]setProperties method changes the set of Java Properties which are persistent
[B] Changing the system properties within an application will affect future invocations
[C]setProperties method changes the set of Java Properties which are not persistent
[D]setProperties writes the values directly into the file which stores all the properties

Show Answer

589). How to use environment properties in the class?

[A] @Environment
[B] @Variable
[C]@Property
[D]@Autowired

Show Answer

590). How to assign values to variable using property?

[A]@Value("${my.property}") private String prop;
[B]@Property("${my.property}") private String prop;
[C]@Environment("${my.property}") private String prop;
[D]@Env("${my.property}") private String prop;

Show Answer

592). How to read a classpath file?

[A]InputStream in = this.getClass().getResource(“SomeTextFile.txt”);
[B]InputStream in = this.getClass().getResourceClasspath(“SomeTextFile.txt”);
[C]InputStream in = this.getClass().getResourceAsStream(“SomeTextFile.txt”);
[D]InputStream in = this.getClass().getResource(“classpath:/SomeTextFile.txt”);

Show Answer