Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Review
- {
- public static void main(String []args)
- {
- //Java Operators
- int x;
- //the assignment operator "="
- x = 10;
- System.out.println(x);
- // System.out.println(x);
- //addition
- // x = x + 2;
- // System.out.println(x);
- // x+=2;
- // System.out.println(x);
- //
- // // subtraction
- // x = x - 5;
- // System.out.println(x);
- // x-=5;
- // System.out.println(x);
- //
- // x = x * 3;
- // x*=3;
- // x = x/5;
- // x/=4;
- //modulus... we all say "mod"
- //"x mod 4"
- // x = x%4;
- // System.out.println(x);
- //System.out.println(x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement