logo

Crowdly

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на lms.upes.ac.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!