How do I fix a compilation error for unhandled exception on call to Thread.sleep()?

前端 未结 2 515
甜味超标
甜味超标 2020-11-27 21:20

I am new to Java and kind of new to programming (I know diving straight into Java probably wasn\'t the greatest idea.) and I\'ve been getting an error consistently no matter

2条回答
  •  孤街浪徒
    2020-11-27 22:10

    You can get rid of the first line. You don't need import java.lang.*;

    Just change your 5th line to:

    public static void main(String [] args) throws Exception
    

提交回复
热议问题