Hey all

I recently picked up the book "Java the first semester". It uses the EasyIn class to get user input. I have downloaded the file EasyIn.java but I dont know how to make the class accessible from my programs.

As long as the EasyIn class is accessible you can use all the input methods that we have defined in this class

I know I have to put
import EasyIn.*;
at the beginning of my code but in what directory do I put the
file so that my program can link to it when it is compiling?

Many thanks


Recommended Answers

All 5 Replies

If you use import EasyIn.*; then this class must be in same directory as class in which one you wish to use EasyIn

So to use EasyIn the EasyIn.java file must be in the same directory as my appname.java?

Yes, they have to be in same directory

It worked, thanks for your help. I have one more question though, I downloaded netbeans IDE and i liked it, the only problem is that I cannot put the EasyIn.java file into the same directory as my Main.java file that is in my project, Well i can do it but its just not recognising it in the IDE it doesnt see the file and compile and link it. Any ideas or should I stick to using notepad++
Thanks for patience


Simple copy&paste of the class to project folder (PROJECT_DIRECTORY/PROJECT_NAME/src) in Window Explorer with refresh of Netbeans should do the trick

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.