Questões de Concurso Para analista de sistemas júnior - engenharia de software

Foram encontradas 439 questões

Resolva questões gratuitamente!

Junte-se a mais de 4 milhões de concurseiros!

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
Q246000 Inglês
It can be inferred from the text that

the sooner one fixes a broken window, the fatal consequences that could result from its being ignored are minimized or eliminated.
Alternativas
Q244268 Inglês
Concerning Texts I and II, it is possible to affirm that
Alternativas
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
Respostas
131: B
132: C
133: C
134: C
135: A