在CodeEval站点上提交代码 [英] Submitting code on CodeEval site

查看:112
本文介绍了在CodeEval站点上提交代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CodeEval上的Java程序必须接受文件路径作为参数。我使用命令行参数来执行此操作,但是当我在CodeEval上提交代码时,我得到如下的异常。这个问题的一些潜在解决方案是什么?

A Java program on CodeEval had to accept a file path as an argument. I used a command line argument to do this, but I get an exception as below when I submitted my code on CodeEval. What are some potential solutions to this problem?

Exception in thread "main" java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
    at java.util.StringTokenizer.nextElement(StringTokenizer.java:407)
    at Main.FileRead(Main.java:61)
    at Main.main(Main.java:26)


推荐答案

首先,检查class的名称。类名称应为'Main'。
其次,您必须在程序中使用CodeEval编辑器中的所有导入。

Firstly, Check the name of class.Class name should be 'Main'. Second you have to give all the imports in CodeEval Editor which you are using in your program.

这篇关于在CodeEval站点上提交代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆