Questions tagged as 'booleano'

2
answers

What is the difference between Boolean and Boolean?

I ran some tests using Boolean and boolean and apparently returned the same result. See below: Boolean bool = true; boolean bool2 = true; if(bool) Log.wtf(TAG, "Funciona!"); if(bool2) Log.wtf(TAG, "Funciona também!...
asked by 24.10.2016 / 15:57
3
answers

"== true" is it useful for anything? Is it better "!" Or "== false"?

Is == true useful for scans, or is it completely useless? It is best to use ! or == false . Example: if (pessoa.estaMorta() == false) .... if (!pessoa.estaMorta()) .... if (pessoa.estaViva() == true) .... if (pessoa....
asked by 15.07.2018 / 16:37
2
answers

How to convert byte to boolean [8] and convert back?

I need to burn some booleans into a file, and then retrieve them. I can write and read one or more bytes with Classes java.io.FileInputStream and java.io.FileOutputStream , so I need to convert 1 byte to an array of 8 booleans,...
asked by 01.07.2017 / 22:15
1
answer

Simulate the Boolean type in C

What is the most appropriate way to simulate type bool in C? My teacher did it quite simply. #define bool int But I also found an excellent answer aqui ( follows a copy of the code). // Criando a enumeração: enum boolean { tr...
asked by 01.11.2015 / 15:48
2
answers

Boolean arguments, in general, are not good?

I was reading some of the Clean Code . The book talks about "good programming practices" , and on the internet, one of the slides    Boolean arguments are generally not good. I did not understand the reason for this sentence. Although...
asked by 09.08.2017 / 18:39
2
answers

What is Boolean?

What exactly is Boolean? Could you give practical examples? Does it make a difference to write true or True ?     
asked by 23.06.2017 / 13:55
2
answers

Return DataReader to field type bool

I need to return a field that is of type bool : public List<TB_USUARIO> ListarTodos() { var strQuery = "select * from tb_usuario"; using (contexto = new Contexto()) { var retornoDataRead...
asked by 11.05.2016 / 17:36
2
answers

Error declaration null - Unknown type name 'bool'

The error you are giving is in this function. bool tem_numero_na_lista(tipo_lista * aux, int valor) { while (aux - > prox != NULL) { if (aux - > info == valor) { return true; } aux = aux - > prox; else {...
asked by 18.04.2017 / 16:31
1
answer

Why use the "is" variable beginning in Kotlin?

What is the reason for using is in front of the variable. Example source code. I know it has something to do with set . class Rectangle( val height: Int, val width:Int) { val IsSquare: Boolean get(){ return height...
asked by 26.11.2017 / 17:06
1
answer

Is there a name for the "boolean of 3 states"?

But how so a "boolean of 3 states"? Generally used in comparison between dates, where possible results are -1 , 0 , 1 . I was in a similar situation and I had this doubt when I wanted to ask my colleague about a possible...
asked by 28.08.2018 / 15:12