如果类名写Con的话,Myeclipse会提示“A class file was not written. The project may be inconsistent, if so try refreshing this project and
building it”
网上找到的方法是->Project->Clean...->选择Clean all projects->点击ok,但是不管用,这就使我想到了以前写数据库连接的时候类名写得是Conn而不是Con。
回归正题,既然一个java文件写两个类不行,为什么不写成两个java文件呢,我抱着试试的心态去建立一个新的java 文件,当输入Con类名得时候,去出现如下提示:Type name is not valid. 'Con' is an invalid name on this platform.
看来真的是Con这个名字是有问题的,Com是正常的 作者: 李海鹏 时间: 2013-7-5 13:56
con是connect的缩写,我想应该是和这个冲突了吧作者: 孙四有 时间: 2013-7-7 00:33
什么东东作者: 孙四有 时间: 2013-7-7 00:33
什么东东作者: 秦兰之 时间: 2013-7-7 10:15
改为已解决行不?我今天尽看你的贴了,费我时间你明白不?