本文介绍了解析时到达文件末尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 有人可以帮助我,我正在尝试编译一个程序但是有一个错误 它在调用时被调用到达文件末尾?任何人都在寻求帮助 公共类记录 { public static void main(String args [] ){ System.out.println(" Enter name"); float name = Keyboard.readInt(); switch(name){ case Ryan: System.out.println(" ID 0569290(M)SURNAME Mifsud GROUP NO 1); 休息; 开关(姓名){ 案例Robert: System.out.println(" ; ID 086790(M)SURNAME Vella GROUP NO 3); 休息; 开关(姓名){ case Victor: System.out.println(ID 0548790(M)SURNAME Cassar GROUP NO 5); 休息; 开关(姓名){ 吉姆: System.out.println(I.D。 0971790(M)SURNAME Dimech GROUP NO 8); 休息; 开关(姓名){ 案例Sam: System.out.println(" ID 0321790(M)SURNAME Muscat GROUP NO 10); 休息; 开关(姓名){ 案例Leo: System.out.println(" ID 0104790(M)SURNAME MIfsud GROUP NO 2); 休息; 开关(姓名){ 案例格伦: System.out.println(" ID 0274790(M)SURNAME Borg GROUP NO 6); 休息; 开关(姓名){ 案例Kyle : System.out.println(" ID 0721790(M)SURNAME Fabri GROUP NO 11); break; 开关(姓名){ 案例Kurt: System.out.println(" I.D。 0589790(M)SURNAME Caruana GROUP NO 2); 休息; 开关(姓名){ case Ian: System.out.println(" ID 0761790(M)SURNAME Grima GROUP NO 4); 休息; 默认值: System.out.println(无效名称); } } 错误在最后一个大括号解决方案 Hi,can somebody help me, I am trying to compile a programm but have an errorit is called reached end of file while parsing?? Anyone mind th have a look for some helppublic class records{ public static void main (String args[]){ System.out.println("Enter name"); float name = Keyboard.readInt(); switch (name) { case Ryan: System.out.println ("I.D. 0569290(M) SURNAME Mifsud GROUP NO 1"); break; switch (name) { case Robert: System.out.println ("I.D. 086790(M) SURNAME Vella GROUP NO 3"); break; switch (name) { case Victor: System.out.println ("I.D. 0548790(M) SURNAME Cassar GROUP NO 5"); break; switch (name) { case Jim: System.out.println ("I.D. 0971790(M) SURNAME Dimech GROUP NO 8"); break; switch (name) { case Sam: System.out.println ("I.D. 0321790(M) SURNAME Muscat GROUP NO 10"); break; switch (name) { case Leo: System.out.println ("I.D. 0104790(M) SURNAME MIfsud GROUP NO 2"); break; switch (name) { case Glen: System.out.println ("I.D. 0274790(M) SURNAME Borg GROUP NO 6"); break; switch (name) { case Kyle: System.out.println ("I.D. 0721790(M) SURNAME Fabri GROUP NO 11"); break; switch (name) { case Kurt: System.out.println ("I.D. 0589790(M) SURNAME Caruana GROUP NO 2"); break; switch (name) { case Ian: System.out.println ("I.D. 0761790(M) SURNAME Grima GROUP NO 4"); break; default: System.out.println("Invalid name"); } } the error is on the last bold bracket 解决方案 这篇关于解析时到达文件末尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-04 12:12