the public type xxx must be defined in its own file

就是public类名要和文件名一致

原文地址:https://www.cnblogs.com/chmusk/p/11078959.html