VertitimeX Technologies

Java Operators.

  • Operators are symbols that perform operations on variables and values.
  • Examples -
                // declare variables
                int x = 1, y = 2;
    
                // Addition operator
                System.out.println("x + y = " + (x + y));
    
                // Subtraction operator
                System.out.println("x - y = " + (x - y));
    
                // Multiplication operator
                System.out.println("x * y = " + (x * y));
    
                // Division operator
                System.out.println("x / y = " + (x / y));
    
                // Modulo operator
                System.out.println("x % y = " + (x % y));