Q. How to assign values to variable using property?

  • (A) @Value("${my.property}") private String prop;
  • (B) toString()
  • (C) @Environment("${my.property}") private String prop;
  • (D) @Env("${my.property}") private String prop;
πŸ’¬ Discuss
βœ… Correct Answer: (A) @Value("${my.property}") private String prop;

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
204
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ranjeet
Publisher
πŸ“ˆ
95%
Success Rate