How do i get Java commands to be recognized in command prompt?

I would like to do some of my Java programming homework at home, and when i type things such as "javac" & "java" it does not recognize it. How do i set it up so it recognizes Java coding?

What sort of system are you using? For Debian/Ubuntu, try "sudo apt-get install javac" or use whatever package manager you have.