This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classes" Watch "classes" New topic
Author

classes

Manoj Zachariah
Ranch Hand

Joined: Dec 08, 2003
Posts: 65
if i write a java program with two classes, each class in a separate file. how can i inherit one class from the other?
thanks!!!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8707
    
    6

The compiler resolves the dependency by searching the classpath.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Manoj Zachariah
Ranch Hand

Joined: Dec 08, 2003
Posts: 65
i'm a beginner here, so can you tell me the parameters i should pass while compiling the above program. :roll:
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10

[ December 18, 2003: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
It makes no difference whether the classes are in the same file or in different files.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: classes
 
Similar Threads
What's wrong with El function.
listener classes-small doubt
Passed PartII-III with 100%
Class diagrams
Should I remember all the menthods of classes?