Using which one of the following lines will the error be removed?
A. \\com\getinstance\util\Debug::helloWorld();
B. getinstance\util\Debug::helloWorld();
C. main.com\getinstance\util\Debug::helloWorld();
D. \com\getinstance\util\Debug::helloWorld();
Answer:A
Using which one of the following lines will the error be removed?
A. \\com\getinstance\util\Debug::helloWorld(); B. getinstance\util\Debug::helloWorld(); C. main.com\getinstance\util\Debug::helloWorld(); D. \com\getinstance\util\Debug::helloWorld();
Explanation: PHP is looking below the namespace main for com\getinstance\util and not finding it. That’s because we are using a relative namespace here. Just as you can make absolute URLs and filepaths by starting off with a separator so you can with namespaces.