All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
There is no way to case a boolean into an int, but here is a quick way to convert them:
Learning starts with a question and continues with a discovery Stay hungry for knowledge.
You would not want to catenate it to a String. You probably mean boolean, not Boolean, but with unboxing, you will hardly notice a difference.You cannot parse those Strings to ints. You can do this sort of thing:-…but I do not think you would ever want to. You should get out of thinking 0=false and 1=true or nonzero=true. That is why Java® supports a boolean datatype and does not use ints instead.Bill foster wrote:. . . Can you concatenate the Boolean into a string then parse it into a int? . . .
Learning starts with a question and continues with a discovery Stay hungry for knowledge.
Actually I said that after the code. The reason for saying thatBill foster wrote:Hi Richie,
in your code . . .
You said that we need not to think of false/true as int numbers, . . .
Learning starts with a question and continues with a discovery Stay hungry for knowledge.
Learning starts with a question and continues with a discovery Stay hungry for knowledge.
I think you have got itBill foster wrote:. . . I misunderstood this, I thought the values were represented by numbers, the values 0 and 1 is what you as the programmer decides?
. . .
Consider Paul's rocket mass heater. |