Java

posted by .

I need help putting the following trace into pseudocode


1 public class testOperators
2 {
3 public static void main(String[] args)
4 {
5 int x;
6 int y = 12
7 double z = 13.0;
8 x = 14
9 System.out.println(“x + y + z = “ + (x + y +z));
10 x += y;
11 y--;
12 z++;
13 z *= x;
14 System.out.println(“x + y + z = “ + (x + y + z));
15 }
16 }

Trace:
Line # X Y Z Output
5 ?
6 12
7 13.0
8 14
9 x + y + z = 39.0
10 26
11 11
12 14.0
13 364

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Java

    1 public class testOperators 2 { 3 public static void main(String[] args) 4 { 5 int x; 6 int y = 12 7 double z = 13.0; 8 x = 14 9 System.out.println(“x + y + z = “ + (x + y +z)); 10 x += y; 11 y--; 12 z++; 13 z *= x; 14 System.out.println(“x …
  2. Computer Science

    //program that puts two lists in order in one single list with all the numbers in order import java.util.Scanner; public class listOrder { public static void main (String [] args){ int [] list1; int [] list2; int [] list3; int temp; …
  3. Computers

    //program that puts two lists in order in one single list with all the numbers in order import java.util.Scanner; public class listOrder { public static void main (String [] args){ int [] list1; int [] list2; int [] list3; int temp; …
  4. Java Panel Problem

    I am supose to draw a grid and center it with a 10 pix border all the way around it. I have done this but no matter what I do I cannot get a 10 pix border. Here is my code. You will notice i have added 20 to the setsize param to account …
  5. computer science

    Im trying to create an arraylist that's sorted but I have no idea how to sort the numbers. I cant use the array.sort method here is my code: public class Testing { private int [] data; private int count; private static int defCapacity …
  6. programming

    m trying to create an arraylist that's sorted but I have no idea how to sort the numbers. I cant use the array.sort method here is my code: public class Testing { private int [] data; private int count; private static int defCapacity …
  7. Computer Science

    I posted this question before. The assignment was: write a Java method if the first parameter is less than the second parameter add the two and print the result ten times. How do I write the result 10 times as a loop?
  8. Computer Programming

    I already posted this question but I gave it a try I'm not sure if I'm on the right track: Make a util class with three methods. First method's name is add, that returns the result by adding two numbers. Second method's name is multiply, …
  9. Computer Science

    public class PrimeNumbers { public static void main(String[] args) { int x = 100; for(int i=2; i <= x; i++) { if(i%2==0) System.out.println("notprime"); System.out.println(i) ; if(i%1==1) System.out.println("prime"); } }
  10. Java programming

    Hi, I'm trying to figure out how to implement toString() methods into the JavaTest and H2ClassB classes so that the output would be 4 3 7 5 99 3: import java.util.ArrayList; public class JavaTest { ArrayList <JavaTest> list = …

More Similar Questions