adplus-dvertising
frame-decoration

Question

Which among the following for public specifier is false?

a.

The static members can’t be public

b.

The public members are available in other packages too

c.

The subclasses can inherit the public members privately

d.

There can be only one public class in java program

Answer: (a).The static members can’t be public

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which among the following for public specifier is false?

Similar Questions

Discover Related MCQs

Q. How many public class(s) (outermost) can be there in a java program?

Q. If members of a super class are public, then________

Q. We can reduce the visibility of inherited methods.

Q. Which among the following can be used for outermost class access specifier in java?

Q. Which among the following have least security according to the access permissions allowed?

Q. If the members have to be accessed from anywhere in program and other packages also, which access specifier should be used?

Q. If a class have default constructor defined in private access, and one parameter constructor in protected mode, how will it be possible to create instance of object?

Q. Protected access is same as default access that is given implicitly in java if no specifier is mentioned.

Q. Which among the following can use protected access specifier?

Q. If protected members are to be accessed from outside the class then__________

Q. If protected inheritance is used then _____

Q. If all the members are defined in protected specifier then ( Constructors not considered ):

Q. Protected members differ from default members as_______

Q. If the protected members are to be made accessible only to the nearest subclass and no further subclasses, which access specifier should be used in inheritance?

Q. If a constructor is defined in protected access, then.

Q. Which among the following best describes the protected specifier?

Q. Private member functions can be overloaded.

Q. Which access specifier is/are most secure during inheritance?

Q. If private members has to be accessed directly from outside the class but the access specifier must not be changed, what should be done?

Q. Which among the following is correct to call a private member from outside the class?