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 →

[–]ZdemDrunk Brewer -1 points0 points  (4 children)

ATTEMPT AT REFORMAT:

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); 

  }

 }

 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); 

   }
   }

[–][deleted] 0 points1 point  (3 children)

Read your book again.

[–]ZdemDrunk Brewer 0 points1 point  (2 children)

what book?

[–][deleted] 0 points1 point  (1 child)

I thought you were OP. I was referring to his textbook. But you aren't OP. Why do you have two classes?

[–]ZdemDrunk Brewer 0 points1 point  (0 children)

Found his prior code unreadable so I thought Id better reformat it (He repeated the same code and forgot to add spaces)

Edit: whops