Amarnath Pandi

Greenhorn
+ Follow
since Dec 04, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amarnath Pandi

Hi,

There are lot of documents available in the Internet.

I've given one link here http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html
13 years ago
Hi Deepak,

Consider the packages as folders.

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"
13 years ago
Hello Abhradeep,

After seeing your replies, I'd like to recommend you to go through the Java Tutorials. All the Best




14 years ago
Please try this program.


14 years ago
If you want to initialize and declare a variable inside while loop statement itself why don't you use the for loop itself to serve the purpose?

for(int i=0;i<MAX;){
//Code
i++; //Change the value of i
}



14 years ago
May be you should try to change the main method's argument name!

When you say A a = new B(); you mean class A only. A doesn't have a method called meth();



From the object 'a' you cannot see the variable y.
14 years ago
Could you explain little more about the code.

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[]?

14 years ago
I've compiled the same code successfully.

Try to set the class path.

or

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.

14 years ago
Are you using any IDE like eclipse? I think running the same class on a command line terminal shouldn't throw NPE.
14 years ago