Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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] = ....

image text in transcribedimage text in transcribed

3 4 nodes are named after line numbers false true false 7 true J-1 FG-1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

please dont use chat gpt or other AI 9 4 5 .

Answered: 1 week ago

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago