Question in inheriting and hiding methods & classes 
<p>I have questions about inheriting(extending) methods from classes and hiding some classes and methods from the main :)</p>

<p>Assume that I have class A &amp; class B. Class B has method 1. and I need to use that method(method 1) in class A, but in the same time I need to hide that class(Class B with its methods) from the main.</p>

<p>I mean I want to deal with method 1 only from class A(or any other additional class, let's say Class C) I don't want it to be seen in the main. I don't want to give the possibility for the main to create an instance from Class B to use method 1. I need to do that, because when I create a jar file for my classes, there are classes that have methods that I don't want them to be shown. These classes I used them only when I did create the jar file.</p>

<p>How I can hide these classes and methods ?? I hope my explanation is clear...</p>

<p>Please don't tell me to do these things, because I thought of it, and it doesn't works : :)</p>

<p>1) to use private for the methods that I don't want them to be shown, because I can't do that. since, it's  a separated classes not in the same class, and when I put private near the function , I can't use it at all, only it will works with the same class.</p>

<p>Also, </p>

<p>2) To put all the functions in the same class, Because I need to organize my code with classes with a separated files :)</p>

<p>Thanks alot Guys ....</p>
