1Z0-869 Web TestEngine demo

Exit VCEDump 1Z0-869 Java Mobile Edition 1 Mobile Application Developer Certified Professional
Question 7 of 51
0% complete
Q7 Single choice

Click the Exhibit button.

Given the GameCanvas code:

10. public void run() {

11. try {

12. Graphics g = getGraphics();

13. Image dog = Image.createImage("/dog.png");

14. Sprite s = new Sprite(dog, 98, 88);

15. s.setPosition(0,0);

16. while (gameActive) {

17. s.setFrame(0);

18. s.paint(g);

19. flushGraphics();

20. s.setFrame(1);

21. s.paint(g);

22. flushGraphics();

23. }

24. } catch (Exception ex) {

25. //...

31. }

32. }

Assuming that gameActive is true, and that run() is called as a result of a new thread's start() invocation, what is the result?

Question 7 diagram

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in