Exercices in this course

You have to perform outside of the doc directory not an inside.

/opt/app $ ls
/opt/app $ javadoc -d doc MyClass.java

It will generate documentation in the doc directory.

You can use echo command if you don’t want to write manually(vi editor).
You are getting permission issues because under /etc/ all main configuration files are located. So normal user cannot edit or change without sudo privileges.
There is only single file available /etc/hosts so after hosts file, not recommend to use slash(/).

sudo echo "  www.google.com"  >> /etc/hosts

If you want to switch into root user then you can do
sudo -i

If you are facing any issues again let me know. Try it.

While i am trying to install tomcat-8.5.53 with wget command. Its showing error : wget command not found as showin the screenshot attached