Q22
Multiple choice
Given the MIDlet code:
11. try {
12. while (true) {
13. ServerSocketConnection server = (ServerSocketConnection)
14. Connector.open("socket://:444", Connector.READ, true);
15. SocketConnection conn= (SocketConnection)
16. server.acceptAndOpen();
17. InputStream is = conn.openInputStream();
18. StringBuffer buffer = new StringBuffer();
19. for (int ch = -1; (ch = is.read()) != -1; ){
20. buffer.append((char)ch);
21. }
22. System.out.println(buffer);
23. }
24. } catch (IOException x) {}
Which two are true? (Choose two.)
Select all that apply.