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.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
Import classes in onlinegdb
+1
vote
asked
Feb 11, 2020
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 Main.java file and do import A;, it throws error "." and ";" expected at end of the import line.
import
java
Please
log in
or register to answer this question.
2 Answers
+1
vote
answered
Feb 12, 2020
by
gameforcer
(
3,010
points)
You probably just need to include file extension in it's name, that way it always worked for me.
Please
log in
or register to add a comment.
+3
votes
answered
Feb 21, 2020
by
zemiak
(
570
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
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...