class A { protected int method1(int a, int b) { return 0; } }Which is valid in a class that extends class A? - Study24x7
Social learning Network
20 Feb 2023 04:29 PM study24x7 study24x7

class A { protected int method1(int a, int b) { return 0; } }Which is valid in a class that extends class A?

A

public int method1(int a, int b) {return 0; }

B

private int method1(int a, int b) { return 0; }

C

public short method1(int a, int b) { return 0; }

D

static protected int method1(int a, int b) { return 0; }

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles