Suitable modifiers

Report a typo

You have declared a class SomeClass in the package org.hyperskill.java.

package org.hyperskill.java;

class SomeClass {

    ??? long longVal;
}

There is another class Demo in the same package. In a method of this class, you have an instance of SomeClass.

Which of the listed access modifiers can be written instead of ??? to have the ability to set a value to the field longVal of the instance?

Select one or more options from the list
___

Create a free account to access the full topic