how can i use a added file item.java in main .java

0 votes
asked Nov 7, 2019 by anonymous

1 Answer

0 votes
answered Nov 12, 2019 by mayur007 (180 points)
You can import external java file using the following import statement:

import <package_name>.<class_name_specified_in_item.java>;

example:

import pack1.Items;
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...