Important Java Mcq 1

Given the following class definition which of the following are NOT considered part of the class’s public interface?

Public class motorcycle{
    Public static final int WHEEL_COUNT = 2;
    Private int rpmRating;
    Public void updatePrice(double increase){..}
    Private String designCode{..}
  }

a. rpmRating and designCode

b. WHEEL_COUNT and designCode

c. WHEEL_COUNT and updatePrice

d. updatePrice and designCode

Answer:

c. WHEEL_COUNT and updatePrice

Explanation

WHEEL_COUNT and updatePrice are not considered as a part of the public’s Class interface.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?