Sail E0 Webinar
Question
Which one of the following is the right way to define a constant?
Options:
A .  constant PI = 3.1415?;
B .  const $PI = 3.1415?;
C .  constant PI = '3.1415';
D .  const PI = '3.1415';
Answer: Option D


Class constants are created like: const NAME = 'VALUE';



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :

Latest Videos

Latest Test Papers