I have a package com.deepak.test that means I have a folder structure like com/deepak/test
I also have one more package com.deepak.test1 that means I have a folder structer like com/deepak/test1
If I have a class TestClass in both packages and I want to call this class from some other package.
When I want to import a TestClass from com/deepak/test1 folder. It is almost like giving the path of the class. JVM will search the same path in its classpath.
I'll mention "import com.deepak.test1.TestClass"
or if I want the TestClass in com/deepak/test then I'll mention as "import com.deepak.test.TestClass"
in sortByPopulation,
You are comparing b[] but only swapping a and b. is it OK? In this case b[] values will not be changed right?
What is in a[] and b[]?
Try to use the full path before javac.
"c:\Program Files\Java\jdk1.6.0_02\bin\javac.exe" TestPassword.java
If the class TestPassword is in a package then you have to add the package in front of the class name.
"c:\Program Files\Java\jdk1.6.0_02\bin\javac.exe" package\TestPassword.java
If it compilation succeeded then try
"c:\Program Files\Java\jdk1.6.0_02\bin\java.exe" package.TestPassword
One more correction:
passwd.equals("joe") // I hope this code will not serve the purpose.