How to call java class that is in diffrent location?
-
Hello. I have a problem. I dont know how to call a class in java from second class to the first. For example: I have one class that is in E:/test, and I have a second class that is in E:/text. How I can call the first class in the second class. Thank you
-
Answer:
If put one of the classes in a package and by using the package keyword at the top of your code: package text; //rest of your code Then in the other one, put this: import text.nameOfClass; You might have to put them in the same directory to work, which I guess kind of defeats the purpose, but that's how you do it. I hope this helped.
Depeche at Yahoo! Answers Visit the source
Related Q & A:
- How To Trace Mobile Number In India With Exact Location?Best solution by Yahoo! Answers
- How to rotate a Direction Arrow to a particular location?Best solution by Stack Overflow
- how to call function in Java?Best solution by Stack Overflow
- How to call delegate methods from other class in Swift?Best solution by stackoverflow.com
- How do I open a program in its original location?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.