In: Computer Science
Classes must have at least one field (T or F)
The answer for this question is false. It's not mandatory that classes always have some field inside them. It's not necessary. To understand this first we should know what's a class.
Class is basically a concept of object oriented programming or what we call as OOPs. A class is basically a prototype or a user defined blueprint. Which represents set of properties or methods which are common to some objects of one type.
Now generally we create objects inside a class but it's necessary that you always create something inside the class. Suppose if you create a empty class for ex-
Public class sample {
}
Now when you will call that class it will compile successfully get executed but nothing will happen as there is no operation happened inside it. But that doesn't mean it's invalid as it's getting compiled and executed successfully.