Sapient Company Programming

What will be the output of the following code?

AnimatorSet bouncer = new AnimatorSet();
bouncer.play(bounceAnim).before(squashAnim1);
bouncer.play(squashAnim1).with(squashAnim2);
bouncer.play(squashAnim1).with(stretchAnim1);
bouncer.play(squashAnim1).with(stretchAnim2);
ValueAnimator fadeAnim = ObjectAnimator.ofFloat(newBall, "alpha", 1f, 0f);
fadeAnim.setDuration(250);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(bouncer).before(fadeAnim);
animatorSet.start();

1) runs successfully
2) compile time error
3) runtime error
4) none of the above

Read Solution (Total 1)

Sapient Other Question

What type of files does menu directory contain?

1) XML files that define application menus, such as an Options Menu
2) XML files that define application menus, such as a Context Menu
3) Both of the above
4) none of the above
Which of the following is true about 'Killable After property" of Activity Lifecycle's callback methods?
A. onDestroy is Killable
B. An activity is killable from the time onPause() returns to the time onResume() is called
C. onStop method is killable
D. onResume is not killable while onPause is killable

1) A, B and C
2) A, B and D
3) A, C and D
4) B, C and D