Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

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.
...