Here is the code I have been provided
public class Lesson18Test
{
public static void main( String[] args )
{
MethodPractice mp = new MethodPractice();
boolean isEvenTest = false;
boolean multipleTest = false;
double minimum3Test = 0.0;
int gcdTest = 0;
//Problem 1 Test
isEvenTest = mp.isEven(6);
System.out.println( "isEven(6) output: " + isEvenTest );
So here is what I tried to do
public class Lesson18Test
{
public static void main( String[] args )
{
MethodPractice mp = new MethodPractice();
boolean isEvenTest = false;
boolean multipleTest = false;
double minimum3Test = 0.0;
int gcdTest = 0;
//Problem 1 Test
public void setisEvenTest ( int Test )
int test = 6;
if (test % 2)
return true;
else
return false;
isEvenTest = mp.isEven(6);
System.out.println( "isEven(6) output: " + isEvenTest );
Here are the errors I am currently getting in my code
" [line: 21]
Error: illegal start of expression
[line: 21]
Error: illegal start of expression
[line: 21]
Error: ';' expected
[line: 21]
Error: ';' expected"
So what should I do to fix these errors? Am I even doing this the right way? I am not entirely sure how to work with the code my teacher provided, but I think I coded the right way. If I am correct my code will print "isEvenTest" which will either be true or false because it is connected to the int Test. So can someone please help me fix this? Thanks in advanced

New Topic/Question
Reply


MultiQuote




|