Discussion Forum : Introduction To Methods And Streams
Question -

Which of the following statements are incorrect?

Options:
A .  public members of class can be accessed by any code in the program.
B .  private members of class can only be accessed by other members of the class.
C .  private members of class can be inherited by a sub class, and become protected members in sub class.
D .  protected members of a class can be inherited by a sub class, and become private members of the sub class.
Answer: Option C

private members of a class cannot be inherited by a sub class.



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *