Questões de Concurso Público Petrobras 2012 para Analista de Sistemas Júnior - Engenharia de Software-2012

Foram encontradas 69 questões

Q244267 Inglês
The fragment that closes Text II, “be aware that you will need to roll up your sleeves and work hard for the first couple years, and you will be rewarded in the end.” (lines 23-25), implies that one must
Alternativas
Q244268 Inglês
Concerning Texts I and II, it is possible to affirm that
Alternativas
Q249352 Programação
    Sejam as seguintes classes Java:

public class CA {
            int val=0;
            public void op1(int x)
            {
                      val+=x;
            }
            public void op2(int x,int y)
            {
                      val-=x+y;
            }
                      int getVal()
            {
                      return val;
            }
}
public class CB extends CA{
          public void op1(int x)
            {
                      val-=x;
            }
          public void op2(int x,int y)
            {
            try
            {
                     val+=x/y;
            }
            catch(Exception e)
            {
                      val=10;
            }
            finally
            {
                      val++;
            }
      }
}
public class Main {
          public static void main(String[] args) {
                      CA obj=new CB();
                      obj.op1(10);
                      obj.op2(5,8);
                      System.out.printf(“%d\n”,obj.getVal());
            }
}



O que será exibido no console quando for executado o método main ( ) ?

   
Alternativas
Q249353 Programação
Suponha que as classes Circulo, Desenho e Figura ocupem arquivos separados.

Em qual código Java elas serão compiladas sem erros?

Alternativas
Q249354 Programação
    Sejam as seguintes classes Java:

public class Xpto implements Runnable {
        public void run()
        {
                    try {
                            Thread.currentThread().join(0);
                              System.out.println(10);
                    }
                    catch(SecurityException e) {
                              System.out.println(20);
                    }
                    catch(IllegalMonitorStateException e) {
                             System.out.println(30);
                  }
                  catch(IllegalArgumentException e) {
                            System.out.println(40);
                  }
                  catch(Exception e) {
                            System.out.println(50);
                  }
          }
}
public class Q04 {
            public static void main(String[] args) {
                      Thread t=new Thread(new Xpto());
                      t.start();
                      t.interrupt();
            }
}

O que será exibido no console após a execução do comando t.interrupt()?    
Alternativas
Respostas
16: A
17: C
18: B
19: C
20: E