Java interview preparation Quiz 4 Welcome to your Fresher Interview Preparation - Java Skills - 4 Name Email Phone Number 1. A ________thread cannot restarteddeadnonealivelive2. Yes _______ statements can be nested.gotryhome.none3. The default value of an object reference declared as an instance variable is ____.nulldatanoneobjec4. _______________ wakes up all the threads that called wait() on the same subject.public void notify()public void notifyAll()public void wait()none5. ______________ class is used by server applications to obtain a port and listen for clientrequests.javaobjectjava.net.serversocketnone6. The ________________ class is used by server applications to obtain a port and listen forclient requests.datasocketnonejava.net.serversocket7. Java is a ____________ programming language.nonemulti-threadedprogrammultiple8. What are the ____________ steps for creating an object for a class.231none9. Udp stands for _________________ , a connection-less protocol that allows for packets ofdata to be transmitted between applications.user datagram protocoluse datagram protocolnoneuser data protocol10. An ____________ object cannot be changed once it is created.datanoneimmutablemutable11. _______________ called only when the browser shuts down normally.nonedodestroywhile12. A ___________ program contains two or more parts that can run concurrently and each partcan handle a different task at the same time making optimal use of the available resources speciallywhen your computer has multiple CPUs.memorymulti-threadednonemultiple13. The Java supports _________ types of comments124314. The purpose of the __________ class is to provide access to system resources.nonedatasystemmemory15. The __________ class is used to tailor program output to the conventions of a particulargeographic, political or cultural region.dailypagenonelocale16. ____________ class is used to create objects that provide access to the files and directories ofa local file system.filenonememorydata17. ___________________ resumes a thread, which was suspended using suspend method ().nonepublic void suspend()public void stop()public void resume()18. ________________ stops a thread completelynonepublic void suspend()public void stop()public void resume()19. The Java.net package provides support for the ________ common network protocols:321none20. ____________ method is used to get the primitive data type of a certain string.dataparseint()parsenone21. The __________ system generates runtimeexception and error exceptions.noneclassobjectjava runtime22. ____________ is used to store XML, java classes, and javaserver pages.nonedataWARmemory23. ________________ causes the current thread to wait until another thread invokes the notify().public void wait()nonepublic void notifyAll()public void notify()24. __________________ is automatically called when the user moves off the page on which theapplet sits.forwhilestopnone25. ______________ control object creation, limiting the number to one but allowing theflexibility to create more objects if the situation changes.tripledoubletonsingleton classnone26. There are ____________ simple methods, which makes thread communication possible.1none3227. ______________ describes a situation where two or more threads are blocked forever, waitingfor each other.deadlocknonebadlockcoldlock28. _____________ puts a thread in the suspended state and can be resumed using resume()method.public void resume()public void stop()nonepublic void suspend()29. Default value of byte datatype is _______.none21030. _________________ causes the current thread to wait until another thread invokes thenotify().voidpublicnonepublic void wait ()31. _____________ wakes up a single thread that is waiting on this object's monitor.notifypublic void notify()publicnone32. _______________ is a reference to an object whose lock associates with the monitor that thesynchronized statements represents.objectobjectidentifierclassnone33. There are ____________ methods in the applet class gives you the framework.42none534. When serializing an object to a file, the standard convention in java is to give the file a .serextension.devdatsernone35. Java uses ________ compiler to enable high performance.nonetimejust-in-timejust36. _________________ wakes up a single thread that is waiting on this object's monitor.nonepublic void notify()public void wait()public void notifyAll()37. There are ___________ basic stages in its life cycle.34none538. ____________ class represents the socket that both the client and server use to communicatewith each other.javanonedatajava.net.socket39. _______________ is intended for whatever initialization is needed for your applet.fornonewhileinit40. _______________ invoked immediately after the start() method.paintmemorydatanone41. Java ______ priorities are in the range between MIN_PRIORITY and MAX_PRIORITY.threadmemoryfunctionsnone42. Java programming language provides a very handy way of creating threads and synchronizing their task by using _______________ blocks.datanonesynchronizedmemory43. _________ provide the communication mechanism between two computers using TCP.socketsnoneallocdealloc44. ____________ method is used to get the primitive data type of a certain string.datanoneparseint()parse45. _____________ is a tool which comes with jdk and it is used for generating java codedocumentation in HTML format from java source code which requires documentation in apredfined format.javanoneJavadocdocument46. _________________ is automatically called after the browser calls the init method.forstartwhilenone47. ________________ is used to save space in large arrays.byte datatypebitnonechar48. There are _____________ static methods which you can use on thread objects to control theirbehaviour.45none349. Tcp stands for ________________ which allows for reliable communication between twoapplications .nonetransmission control protocol.user data protocoluse datagram protocol.50. An ____________ is a java program that runs in a web browser.appletdupletcupletnonePlease fill in the comment box below. Time is Up!