Exit demo 1Z0-869 Java Mobile Edition 1 Mobile Application Developer Certified Professional PDF format · free preview

Oracle 1Z0-869 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/1z0-869.html

Question 1
Single choice

Given:

a new record store rs, of type javax.microedition.rms.RecordStore containing zero records

a method called addNewRecord that adds a record to rs

And:

21. addNewRecord("Amy");

22. addNewRecord("Bill");

23. addNewRecord("Candy");

24. addNewRecord("Doug");

25. rs.deleteRecord(1);

26. rs.deleteRecord(3);

27. addNewRecord("Ethan");

28. addNewRecord("Frank");

29. int nextRecNum = rs.getNextRecordID();

What is the value of nextRecNum?

A.

7

B.

5

C.

4

D.

6

Question 2
Single choice

How would a MIDlet that uses a GameCanvas efficiently update only a small region of the screen, from the data in the off-screen buffer?

A.

call flushGraphics(int, int, int, int) that specifies the region to be flushed

B.

call serviceRepaints() and set a clip region on the Graphics object in paint()

C.

Pixels that are NOT to be flushed should be made transparent.

D.

write extra code to coalesce the flushGraphics() calls over many loops into one call

Question 3
Single choice

Given:

10. //...

20. try {

21. Hashtable table = new Hashtable();

22. for (;;) table.put(new Object(), new Object());

23. } catch (OutOfMemoryException e) {

24. Display.getDisplay().setCurrent(new Alert("Out of Memory!"));

25. }

26. //...

Which is true?

A.

An exception is thrown at runtime but there is no guarantee an alert will be shown to the user.

B.

Compilation fails.

C.

The program hangs at line 22.

D.

Out of Memory! is printed to the system console.

Question 4
Single choice

Which is true for Item?

A.

The same Command may occur on more than one Item.

B.

The same Item may be appended to more than one Form at the same time.

C.

When adding a Command to an Item, specifying a command type other than Command.ITEM results in a compilation failure.

D.

Minimum and preferred size CANNOT be changed once an Item is created.

Question 5
Multiple choice

Which three statements are true regarding the handling of wireless connections? (Choose three.)

A.

Devices can only support one HttpConnection at a time; therefore, network access from multiple
threads must be serialized.

B.

The connection could unexpectedly terminate while processing the input or output streams.

C.

Performing network operations on the same thread used by the display is likely to block refreshes of the display until the network operations complete.

D.

A network connection could interfere with other services on the device, such as the ability to receive phone calls or SMS on a phone.

E.

Network connections should never be performed on a separate thread, so problems can be handled quickly.

Question 6
Single choice

A MIDlet suite on a device uses socket connections. The device always asks the user for permission when the suite tries opening a socket connection.

What is always false about the MIDlet suite?

A.

It is trusted and requests permission to use sockets with MIDlet-Permissions-User.

B.

It is trusted and requests permission to use sockets with MIDlet-Permissions.

C.

It is untrusted.

D.

It is trusted and requests permission to use sockets with MIDlet-Permissions-Opt

Question 7
Single choice

Click the Exhibit button.

What is the result?

A.

myForm contains the string "run count: 2".

B.

An exception is thrown at runtime.

C.

myForm contains the string "run count: 0".

D.

myForm contains the string "run count: 1".

E.

myForm contains the string "waiting...".

Question 8
Single choice

Which method is initially called when the MIDlet starts in response to a push notification?

A.

PushRegistry.notifyIncomingConnection()

B.

MIDlet.startApp()

C.

MIDlet.notifyApp()

D.

PushRegistry.listConnections()

E.

MIDlet.pushApp()

F.

MIDlet.resumeRequest()

Question 9
Multiple choice

Given the push connection string:

MIDlet-Push-1: socket://:79, com.sun.example.SampleChat, 192.3?.?.

* Which two addresses are allowed to push connection notifications to the application? (Choose two.)

A.

192.31.101.1

B.

192.32.1.101

C.

192.310.101.1

D.

192.3.1.101

E.

192.31.1.1

F.

192.310.10.1

Question 10
Multiple choice

Which two errors are available in CLDC? (Choose two.)

A.

java.lang.VirtualMachineError

B.

java.lang.OutOfMemoryError

C.

java.lang.StackOverflowError

D.

java.lang.UnknownError

Showing 10 of 340 questions · Unlock the full set