include another java file

M

moongeegee

I use import TableTest1 in my TableDemo.java file. But I got compiling
error as below.

TableDemo.java:5: '.' expected
import TableTest1;
^

Please help.
 
L

Laurent D.A.M. MENTEN

moongeegee a écrit :
I use import TableTest1 in my TableDemo.java file. But I got compiling
error as below.

TableDemo.java:5: '.' expected
import TableTest1;
^

Please help.

If TableTest1 is a class, either it is in the same package so you don't
need to import it, or it is in another package then you have to prefix
it with its package specification.
 
R

Roedy Green

TableDemo.java:5: '.' expected
import TableTest1;
^
package names are usually all lower case.
You don't import classes that don't live in packages.
If you have more than one class, they all should live in explicit
packages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top