|
Calculate what e1 and e2 should be
Hi!
I hope someone can help me out.
If e1 has value 5 and e2 has value 8 before this lines has been executed:
int t = e1;
e1 = e2;
e2 = t;
what value will e1 and e2 has after that.
I have started like this: mport javax.swing.*;
public class Tilldelning2 {
public static void main (String[] arg) {
int e1 = 5;
int e2 = 8;
int t = e1;
e1 = e2;
e2 = t;
JOptionPane.MessageDialog(null, "e1 =" + t +" e2");
System.exit(0);
}
}
Thanks for help in advance Legoland,
|