How do I require a file in Java? Much like require(); in PHP, and #include in C++. Would I use #include as in C++ or is there another function?
I'm not looking for import.
How do I require a file in Java? Much like require(); in PHP, and #include in C++. Would I use #include as in C++ or is there another function?
I'm not looking for import.
You are looking for the import
keyword. For example:
import java.util.ArrayList;