1.

Which of these is used as a default for a member of a class if no access specifier is used for it?(a) private(b) public(c) public, within its own package(d) protectedThe question was posed to me in an interview.My question is from Access Control topic in division Classes and Methods of Java

Answer»

Correct OPTION is (a) private

The best I can explain: When we pass an argument by call-by-value a copy of argument is made into the FORMAL parameter of the subroutine and CHANGES made on parameters of subroutine have no EFFECT on original argument, they remain the same.



Discussion

No Comment Found

Related InterviewSolutions