| package variableExperiment; |
| public class Main { |
| public static void main(String[] args) { |
| int x=9+9; |
| System.out.println("This is the value of the variable x: "+x); |
| if(x==18) System.out.println("It's 18, is that funny?"); |
| else System.out.println("Well, for some reason it's not 18, as it should've been..."); |
| int y=x*x+3; |
| System.out.println("The variable y is: "+x+"*"+x+"+3, meaning it is: "+y); |
| int z=x*(y/x+9)*23; |
| System.out.println("The variable z gets its value from the formula <x*(y/x+9)*23> meaning it's: "+z); |
| } |
| } |