aalex Posted May 7, 2012 at 04:29 PM Report #453588 Posted May 7, 2012 at 04:29 PM Viva, imaginemos que tenho os seguintes níveis de pastas: pasta/pasta1 em "pasta1" tenho o ficheiro file1.java e na "pasta" tenho file.java como consigo fazer o import de file.java no ficheiro file1.java?
KTachyon Posted May 7, 2012 at 04:38 PM Report #453593 Posted May 7, 2012 at 04:38 PM // File1 package pasta.pasta1; import pasta.File; public class File1 { //... } “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare
aalex Posted May 7, 2012 at 04:50 PM Author Report #453598 Posted May 7, 2012 at 04:50 PM não esta a resultar, talvez eu não me tenha explicado bem mas no meu caso o "pasta" é o directoria principal do programa (default), será aconselhável criar um package para colocar todo o projecto e depois dentro desse package criar os outros? (pois desta forma acho que funcione) obrigado
KTachyon Posted May 7, 2012 at 04:53 PM Report #453603 Posted May 7, 2012 at 04:53 PM será aconselhável criar um package para colocar todo o projecto e depois dentro desse package criar os outros? (pois desta forma acho que funcione) Sim 😄 “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare
aalex Posted May 7, 2012 at 05:03 PM Author Report #453608 Posted May 7, 2012 at 05:03 PM Sim 🙂 thanks resultou
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now