Question: Please help me with the following Java program. First Program You do not have to read any inputs from a file or a user, you
Please help me with the following Java program.
First Program
You do not have to read any inputs from a file or a user, you may hard code the start and end values in main as long as you pass them to the function (the primeTable function must take these values in and cannot hard code them).
The only difference between methods done in JAVA and your c++ functions are that you will need to include the word 'static' in your method header. The example given here prints out a simple message but make certain it is in the scope block of your class where the main function is located (it can be above or below main without issue):
static void thisIsAFunction()
{
System.out.println("Hey I'm a function");
}
The actual goal of this method/function is to take in 2 inputs (as int's) a start, and an end. Between these 2 values your function will output a table of all the prime numbers between start and end with all the multiples of them.


Prime's table between 14 and 38: 17 19 23 29 31 37 17: 289 323 391 493 527 629 19: 323 361 437 551 589 703 23: 391 437 529 667 713 851 29 : 493 551 667 841 899 1073 31: 527 589 713 899 961 1147 37: 629 703 851 1073 1147 1369Prime's table between 4 and 20: 5 11 13 17 19 5: 25 35 55 65 85 95 7: 35 49 77 91 119 133 11: 55 77 121 143 187 209 13: 65 91 143 169 221 247 17 : 85 119 187 221 289 323 19: 95 133 209 247 323 361
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
