What is the result of the following code execution?

abstract class Test{
    private static int getHalf(int i){
        return i/2;
    }
    public static void main(String[] str){
        int half=getHalf(0);
        System.out.println("Result is:"+half);
    }
}

Follow CodeGalaxy

Mobile Beta

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