logo

Crowdly

Choose the compelling reasons for using nested classes: If a class...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Choose the compelling reasons for using nested classes:

  1. If a class is useful to only one other class, then it is logical to embed it in that class and keep the two together.
  2. Consider two top-level classes, A and B, where B needs access to members of A that would otherwise be declared private. By hiding class B within class A, A's members can be declared private and B can access them. In addition, B itself can be hidden from the outside world.
  3. Nesting small classes within top-level classes places the code closer to where it is used. 

/**/

document.oncopy = new Function("return false");

document.onpaste = new Function("return false");

document.onselectstart = new Function("return false");

document.oncontextmenu = new Function("return false"); /**/

100%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on lms.upes.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!