there is a class In.class that can store a boolean value in class A and create a field public static In in = new In (); and set it to 1

in class B we create the same field and assign the value 2

If from class C contact A.in.value, what value does it return? If from class C then refer to B.in.value which one in this case?

  • 3
    Maybe you still write the code, but you will not write "in the class of such and such we create that"? - Sublihim
  • one
    You write new ln() -> twice to create two objects. And about the "what value it will return" in general - so this is easily verified independently. If the question was "why is А.in.value equal to 1 , and B.in.value is equal to 2 ?" - it would have been another matter. - Regent
  • 2
    It is not clear how to assign a class to a class that stores a bulle value 1. Give an example of a code. - default locale

0