Create class

Report a typo

There is an outer class StringOperations. Your task is to create a static nested class EngString inside of StringOperations.

The class EngString should have:

  • two fields: boolean english and String string
  • a constructor that accepts these fields
  • getters for both fields: isEnglish() and getString()

Please, don't make the class and the methods private.

Write a program in Java 17
class StringOperations {

// create static nested class EngString

}
___

Create a free account to access the full topic