I couldn't see any actual directory.The code compiled and i can see the .class file but not the actual directory created. Do i need to specify any path?? pls suggest me.
Didn't you run the class file using java command >java classname Only compiling wont do, the directory will be created at run time, when you launch your application. The directory will be created on your current directory because no path you have included there!
After compiling and running the code above i got result as: Not equal. Where did that "not equal" come from and i couldn't see any actual directory. I think i did something wrong with that code.Pls help.
Your program is perfectly OK! I think you are running any other program whose name is something similar to your this class name. Check your current directory, where this .java file is saved, you will see a directory "dir1" and a file inside that in which you have written "SCJP is tough exam".
There is no question of printing Not equal so far as you this class file is concerned. Find any other program you may have created to check String equality for example.