Import classes in onlinegdb

+1 vote
asked Feb 11 by Akirakato1 (130 points)
I started a new java project with multiple files. For example, class A with the file name A. If I go to the file and do import A;, it throws error "." and ";" expected at end of the import line.

2 Answers

0 votes
answered Feb 12 by gameforcer (2,950 points)
You probably just need to include file extension in it's name, that way it always worked for me.
0 votes
answered Feb 21 by zemiak (430 points)
Don't use import of your own files, but check if your public classes are in files with same names as class and files have extensions .java
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.