Ir para conteúdo
Fórum Script Brasil

ffbarcelos

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre ffbarcelos

ffbarcelos's Achievements

0

Reputação

  1. Olá pessoal, preciso que alguém me ajude a comentar esse trecho de código, pois estou com dificuldades. public static void main(String[] args) { // TODO code application logic here ArrayList<String> a = new ArrayList<String>(); TreeMap<Integer,String> t = new TreeMap<Integer,String>(); Hashtable<Integer,String> h= new Hashtable<Integer,String>(); System.out.print((a instanceof Collection)+","); System.out.print((t instanceof Collection)+","); System.out.print(h instanceof Dictionary); } Sei que o resultado será "true,false,true" mas gostaria de entender. Obrigado!
  2. Seu esclarecimento me ajudou bastante, mas ainda tenho uma dúvida: Fazendo o teste de mesa: i v j 0 17 128 1 34 128 2 68 128 3 136 128 4 272 128 5 544 128 6 1088 128 7 2176 128 A resposta sei que é 00010001, mas o q não entendi é quando acontece 136 & 128 e 2176 & 128 serem verdadeiro, Por que é verdadeiro?. putchar(v & j ? '1' : '0'); Obrigadooo!
  3. Olá pessoal, Gostaria que alguém pudesse explicar esse trecho de código abaixo, pois estou com dúvidas no trecho j= 1 << 7 e v <<= 1; #include <stdio.h> int main(int argc, char* argv[]) { int v= 17, j= 1 << 7, i; for( i= 0; i < 8; i++) { putchar(v & j ? '1' : '0'); v <<= 1; } }
×
×
  • Criar Novo...