Go to
http://java.sun.com/j2se/1.4.2/install-linux.html This link has detailed instructions to install J2SDK version 1.4.2. You oculd find a similar link if you are going to install another version. Since you mentioned that you are new to linux, let me try to explain something to you. In windows, when you try to install an exe it defaults to some folder in program files folder during installation. Installing an RPM file is something (very remotely) similar. As the previous user said, RPM comes with predefined folders. So if you follow installation instructions in the link above and use RPM file, it will install itself to a proper folder. I believe it will get installed in /usr/local directory. However, please note that in most cases you need administrative access to install RPM (you need to know password of the user "root").
Now, every user in linux has his/her own home directory in which is located at /home/username. So, if you had two users namaste and sathi, both will have their own home directories in /home/namaste and /home/sathi. Each user has all rights within his own directory (he can download and install stuff in his directory). If you do not have root access, you could download binary distribution of j2sdk in your /home/namaste (or whatever it is) and install it there (see instructions to install binary version of j2sdk in the link above). Since only namaste has access to /home/namaste directory, only this user can read, write and execute files in this directory (unless you change permissions).
In a nut shell, if you have root access and if you want more than one users to access j2sdk, it is recommended that you install it in a high level directory (such as /usr/local) and set permissions so that more than one users can use the files. If you have root access, you can install both binary and rpm versions in this directory. Alternatively if you want only one user to access files, it is recommended that you install files in /home/username directory (no need to set permissions).
In my case, I am the only user on my linux distro and I try to install everything in my home directory. So I have directories like
/home/chintan/j2sdk1.4.2
/home/chintan/eclipse (eclipse installation)
/home/chintan/JBoss (
Jboss app server installation)
I wanted mysql database to be available system wide (to every user that I might create in future) so I installed mysql in
/usr/local/mysql
Hope this helps, please post if you have more questions.
C