📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    âš¡ Azaadi sale - Celebrate Independence Day with Flat 55% Off On all courses! 13 to 17 Aug âš¡ Enroll Now

    Question

    Which access specifier allows data to be accessed only

    within the class?
    A public Correct Answer Incorrect Answer
    B private Correct Answer Incorrect Answer
    C protected Correct Answer Incorrect Answer
    D default Correct Answer Incorrect Answer
    E static Correct Answer Incorrect Answer

    Solution

    The private access specifier restricts access to members only within the same class.

    Practice Next
    ask-question

    Not sure which exam is best for you Talk to our expert

    Get My Free Call