Can you write a boolean as an attribute? if yes then how should this be written?

so I was constructing a class on eclipse and I came across this
class attributes:
1. boolean strong: Indicates whether this non playable fighter represents a weak or a strong foe
(Boss). If the value is true then the foe is strong


0|0
0|2

What Guys Said 2

  • Boolean is the type, like int, string, etc. You declare the type of a class member attribute just like any other. It might help to specify what language you're programming in, as eclipse is a rather generic editor useful for developing with a number of languages.

    Java?

    0|0
    0|0
  • Boolian in and of itself is the choice between true or false. It's not an attribute.

    0|0
    0|0

What Girls Said 0

No girls shared opinions.

Loading...