Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which one of the following is the right way to define a constant?

a) constant PI = “3.1415”;
b) const $PI = “3.1415”;
c) constant PI = ‘3.1415’;
d) const PI = ‘3.1415’;

Answer: d
Explanation: Class constants are created like: const NAME = ‘VALUE’;

Join The Discussion