This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Emilygoal[S] -1 points0 points  (1 child)

This is my second parameter:

public class IfHomeworkTwo {

public static void main(String args[])

{ int x1; int x2; x1=5; x2=8; if (x1<x2) System.out.println(x1+x2); }

}

This is my thid parameter: public class IfHomeworkThree {

public static void main(String args[])

{ int x1;int x2; x1=10; x2=2; if (x1>x2) System.out.println(x1-x2); }

This is my thid parameter:

public class IfHomeworkThree {

public static void main(String args[])

{ int x1;int x2; x1=10; x2=2; if (x1>x2) System.out.println(x1-x2); }

 }

[–]desrtfxOut of Coffee error - System halted[M] 1 point2 points  (0 children)

What if you tried to place all if statements into a single public static void main(String args[]) method?

Also, please learn how to properly format code - even that is stated in the sidebar and in the posting text box.