This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PackageInheritance  RSS feed

vijay Krishnan
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Just one week before i had posted the question about the same subject,
but somebody cant understand that question what i had asked.
Now it comes with correct question.

public class Super
int i=5;

package call;
class sub extends Super
void print()
public static void main(String[] args)
new Sub.print();

Here my doubt is,
* Normally i had creted two files in different drives like E:\ and D:\;
* The above program without package expansion it will work by setting
the classpath;
* But i had creted the package file in D:\ drive and the normal class file
in E:\ drive, eventhough i had set out the classpath it wont work;
* I need to know how to create or SET the Classpath to access the Package
file which resides in D:\ drive.

Thanks & Regards,
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!