java how to use classes in other package?
<p>can I import,use class from other package?
In Eclipse I made 2 packages
one is main other is second</p>

<pre>
main
 -main (class)
second
 -second (class)
</pre>

<p>and I wanted the main function of main class to call the function x in second class.
how can I do it? I tried:</p>

<pre><code>import second; 
second.x(); (if both classes are in the same package then it works)
second.second.x();
</code></pre>

<p>but none of them worked.
I'm out of idea now.</p>
