What is the result of the following code:

public class MainClass {
    public static void main(String args[]) {
        int k = 2;
        int m = 10;
        int s =  1 >> k++ + ++m - --k - m-- << 1;
        System.out.println("s = " + s);
        System.out.println("k = " + k);
        System.out.println("m = " + m);
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes