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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started