Java 1
Java 1
Name:___________________________ Batch: CFi-101C Time: 18th July,2011 T 11:30 13:00 Exam: DISM (Java) Question Attempt:_________________ Correct Question :__________________ Total Marks Obt:___________________ Percentage : ______________________
Q1) The setLookAndFeel( ) method of the javax.swing.UIManager is used to set the look and Feel . T/F. Q2) The javax.swing.plaf packages have the required classes to support the look and Feel T/F. Q3) A Swing program deals with following type/s of threads a- Initial Thread b- Event Thread c- Event-Dispatch Thread d- Stack trace Thread i. c,d ii. a,c iii. a,b,c,d iv. d only Q4) To manage the visible area of the client window we uses JScrollPane or JViewPort T/F Q5) what can we use on the left side of instanceOf operator. a- Class b- Reference c- Interface d- Object i. c,d ii. a,c iii. a,b,c,d iv. d only Q6) container = getContentPane() ; container.setLayout(null); a- It will not work b- default layout will be displayed c-setBounds() is use for adding d- flowlayout will call. Q7)swing support a technology call pluggable like and feel T/F Q8)swing is a heavy weight component T/F Q9) swing components are platform independent T/F Q10) AWT is based on peer component and they are not platform independent T/F Q11) JPassword field can be created with constructor JPasswordField(password); T/F Q12)A swing timer fires one or more ActionEvent events after a specified delay T/F Q13) to start the timer we use which of the following method. a- init () b- run() c- start() d- initiate() Q14) The GridLayout Manager arranges the component in terms of rows and columns. T/F Q15) The BorderLayout manager allows to position component in which number of ways. a- 4 b- 2 c- 5 d- 6 Q16)In grid layout there are no gaps between the component and each component can be of different size T/F Q17)TCP/IP is a connection based protocol T/F Q18) which method is use to retrieve the protocol name of the URL. a- ProtocolName() b- getProtocol() c- getUrlProtocol() d- displayProtocol(); Q19)As we know URLConnection is an abstract class ,which of the following methods does it contains. a- getProtocolName() b-gotDisconnected() c- getContentType() d- setConnectTimeout() i. a,b,c ii. a,d iii. c,d iv. b Q20) Which method return the local address of the server socket a- getServerSocket() b-getAddress() c- getInitAddress() d- getInetAddress() Q21)component of url consist of which of the following a- server b- hostname c- filename d- portnumber i. a,b,c ii. a,b,c,d iii. a,d iv. b,c,d Q22)InetAddress class is use for encapsulating the numerical IP address and the domain name for that address T/F Q23) Which method of InetAddress class retruns what A getHostAddress() IP Address in textual format B- getLocalHost() IP Address local host C- getHostName() Host name of IP Address