Adithi Palli

Greenhorn
+ Follow
since Aug 06, 2007
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 Adithi Palli

Hi Jesper,

Thanks for the response.But Iam still confused.
I have kept the fruit.java file in "Food" Directory and I have kept the apple.java file in "Fruit" directory under "Food" Directory.
Now, Iam trying to compile these two files by being in the "Food" Directory on the command prompt. fruit.java is getting compiled but apple.java does not compile. I tried going into the "fruit" directory to compile apple.java, but again it fails. Also I tried compiling by being outside the "Food" and "Fruit" directory. Again, fruit.java compiles and apple.java does not compile.

My query is :

I can compile these two files by coming out of the "food directory " , but by having ony "food" directory and no "fruit" directory . I wanted to know whether Iam doing correct or not?

Thanks,
Adithi
16 years ago
Thank You Bob for your advice. I will definitely try to follow it.

Thanks,
Adithi
Thank You Asha and Camilo.

So, should I alwaays comile apple.java by coming out of Food Directory.
Is there any way in which I can compile this file by being within the Food Directory?

Thanks,
Adithi
16 years ago
Hi All,

I have created a superclass as follows:

package food;
public abstract class fruit { }

I have created a subclass in a seperate file as follows :

import food.fruit;
class apple exends fruit{ }

I have created a directory called food in the directory of my class path setting.

When I am trying to compile these two files on the command prompt as below, they are getting compiled without any error

C:\jp>javac Food\fruit.java

C:\jp>javac Food\apple.java

But when Iam trying to compile them as below, Iam getting an error with the second file (apple.java) as

javac: invalid flag: .
Usage: javac <options> <source files>
use -help for a list of possible options

C:\jp\Food>javac fruit.java

C:\jp\Food>javac . apple.java

Request help on this.

Thanks,
Adithi
16 years ago
Thank You Raef and Jesper.

Regards,
Adithi
Thank You Christophe , Akhilesh and Deepak for your valuabe response.

Regards,
Adithi
Hi All,

Is it required to go through the complete "Java Code conventions" document in java.sun.com website for the SCJP 5 Exam?

Thanks,
Adithi