Duplicate :
|
Name: bsC130419 Date: 08/27/2001 java version "1.4.0-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65) Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode) I have 2 java source files(listed below). One without package setting, and another has package setting. When I try to import the class file without package setting. It caused a error during compilation. The error message is test2.java:2: '.' expected import test1; I've try to compile it on jdk1.3.1, it pass without any error. ------------------------------------------------------ [test1.java] public class test1{ } [test2.java] package test; import test1; public class test2{ public static void main(String[] args){ test1 t1=new test1(); } } (Review ID: 130700) ======================================================================