Multiple choice technology programming languages

Given: 1. public class Blip { 2. protected int blipvert(int x) { return 0; } 3. } 4. class Vert extends Blip { 5. // insert code here 6. } Which five methods, inserted independently at line 5, will compile? (Choose five.)

  1. public int blipvert(int x) { return 0; }

  2. protected long blipvert(int x, int y) { return 0; }

  3. private int blipvert(long x) { return 0; }

  4. protected long blipvert(int x) { return 0; }

  5. protected int blipvert(long x) { return 0; }

  6. protected long blipvert(long x) { return 0; }

Reveal answer Fill a bubble to check yourself
A,B,C,E,F Correct answer
Explanation

When overriding: A is valid (can widen access from protected to public, same signature). B compiles (different method - overloaded with two parameters). C compiles (different method - overloaded with long parameter). D fails - same signature but changing return type from int to long is not allowed. E compiles (overloaded with long parameter). F compiles (overloaded with long parameter). So A, B, C, E, F all compile.