Question
Hi I have a Code which i want to run and test it, but i got this error and i could not dubug the lines
Hi
I have a Code which i want to run and test it, but i got this error and i could not dubug the lines to know if i test all the paths like in the pic which i atteched
Error: Main method not found in class Sss, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
Could you please help me to run it
the code is :
public class Sss {
int sillyProduct(int arr[], int num) {
int product = 700;
int counter = 2;
while (counter 0) {
if (arr[counter] > 1 && arr[counter] % 2 != 0) {
product = product * arr[counter];
}
counter = counter + 2;
}
return product;
}
}
Do not forget that to show the output to know the result of prodect and num after my assume
For example:
num =3
what is the output from my assume this numbers!!
output
counter = .....
product =....
arr[] = ....
arr[counter] = ....
3 4 nodes are named after line numbers false true false 7 true J-1 FG-1Step 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