How to read input with multiple lines in Java

后端 未结 10 1128
名媛妹妹
名媛妹妹 2020-12-05 02:48

Our professor is making us do some basic programming with Java, he gave a website and everything to register and submit our questions, for today I need to do this one exampl

10条回答
  •  借酒劲吻你
    2020-12-05 03:52

    The problem you're having running from the command line is that you don't put ".class" after your class file.

    java Practice 10 12

    should work - as long as you're somewhere java can find the .class file.

    Classpath issues are a whole 'nother story. If java still complains that it can't find your class, go to the same directory as your .class file (and it doesn't appear you're using packages...) and try -

    java -cp . Practice 10 12

提交回复
热议问题