Menu
Question Index
...

What will be the output of the following program?

public class SRITCollege {
    public static void main(String[] args) {
        byte y = 1;
        byte x = 1;
        System.out.print(SRITCollege.returm(x, y) + ", ");
        System.out.println(SRITCollege.returm(2, 2));
        System.out.print("Hello + ");
        System.out.print("Hai");
    }
    protected static long returm(byte x, byte y) {
        return (short) (x / y * 2);
    }
}


2, 2
Hello + Hai
2, 4
Hello + Hai
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App