阅读背景:

在java中调用方法有问题

来源:互联网 

Okay, I'm trying to write a program that does three things. Ask the user to enter three numbers. The next thing is I want is to call a method to sum these numbers and display them. Then I want to call another method to determine if the sum is prime. Now, I know how to do almost all of this, except I'm not sure I understand how to call a new method, and what the purpose is. I can write a program that does all three steps, but without calling to a new method each time. How would I do that? And what is the purpose of doing it like that instead of all just under the main method? Okay, I'm trying to write a program that does t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: