Access Modifier in a top level class can have?

rengaraj

rengaraj

@rengaraj-89Rrct Oct 22, 2024
Sir / madam,
My question is

A top level class may have only the following access modifier. Select one correct answer.

a. package
b. friendly
c. private
d. public

Advance Thanks,
R.Rengaraj
{Java Certification Quiz}
{On this forum my 18th Question.}

Sir,
If i have posted under wrong discussion forum please advice me where to post.
R.Rengaraj

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Mahesh Dahale

    Mahesh Dahale

    @mahesh-E2tZ3t Dec 4, 2009

    A top level class may have only the following access modifier. Select one correct answer.

    a. package
    b. friendly
    c. private
    d. public

    answer D. public

    There are two levels of access control:

    The top level— public, or package-private

    The member level—public, private, protected, or package-private
  • rengaraj

    rengaraj

    @rengaraj-89Rrct Dec 4, 2009

    Sir,
    Thanks for your reply.
    R.Rengaraj
  • sarveshgupta

    sarveshgupta

    @sarveshgupta-txtmu5 Dec 4, 2009

    Yes it will be public