Basic Unary Operator Example-2 || Miscellaneous Operator || Java


In this we are going to see a basic program of basic unary operator example-2 in Java Programming Language.



public class Test {

    public static void main(String[] args) {
        int num = 25;
        num = -num;
        System.out.println(num);

        num = +num;
        System.out.println(num);
    }
}

// Coded by Saahil


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post