Java Programming MCQ (Multiple Choice Questions) - SchoolingAxis

Java Programming MCQ (Multiple Choice Questions)

 Que-  Which of these methods are used to find a URL from the cache of httpd?

a. findfromCache()

b. findFromCache()

c. serveFromCache()

d. getFromCache()


Answer- serveFromCache()


Que-  Which of these variables stores the number of hits that are successfully served out of cache?

a. hits

b. hitstocache

c. hits_to_cache

d. hits.to.cache


Answer- hits.to.cache


Que-  Which of these method of httpd class is used to write UrlCacheEntry object into local disk?

a. writeDiskCache()

b. writetoDisk()

c. writeCache()

d. writeDiskEntry()


Answer- writeDiskCache()


Que-  Which of these method is used to start a server thread?

a. run()

b. start()

c. runThread()

d. startThread()


Answer- run()


Que-  Which of these method is called when http daemon is acting like a normal web server?

a. Handle()

b. HandleGet()

c. handleGet()

d. Handleget()


Answer- handleGet()


Que-  What does URL stands for?

a. Uniform Resource Locator

b. Uniform Resource Latch

c. Universal Resource Locator

d. Universal Resource Latch


Answer- Uniform Resource Locator


Que-  Which of these exceptions is thrown by URL class's constructors?

a. URLNotFound

b. URLSourceNotFound

c. MalformedURLException

d. URLNotFoundException


Answer- MalformedURLException


Que-  Which of these methods is used to know host of an URL?

a. host()

b. getHost()

c. GetHost()

d. gethost()


Answer- getHost()


Que-  Which of these methods is used to know the full URL of an URL object?

a. fullHost()

b. getHost()

c. ExternalForm()

d. toExternalForm()


Answer- toExternalForm()


Que-  Which of these class is used to access actual bits or content information of a URL?

a. URL

b. URLDecoder

c. URLConnection

d. All of the mentioned


Answer- All of the mentioned


Que-  Which of these is a wrapper around everything associated with a reply from an http server?

a. HTTP

b. HttpResponse

c. HttpRequest

d. httpserver


Answer- HttpResponse


Que-  Which of these transfer protocol must be used so that URL can be accessed by URLConnection class object?

a. http

b. https

c. Any Protocol can be used

d. None of the mentioned


Answer- http


Que-  Which of these methods is used to know when was the URL last modified?

a. LastModified()

b. getLastModified()

c. GetLastModified()

d. getlastModified()()


Answer- getLastModified()


Que-  Which of these methods is used to know the type of content used in the URL?

a. ContentType()

b. contentType()

c. getContentType()

d. GetContentType()


Answer- getContentType()


Que-  Which of these data member of HttpResponse class is used to store the response from an http server?

a. status

b. address

c. statusResponse

d. statusCode


Answer- statusCode


Que-  Which of these is a bundle of information passed between machines?

a. Mime

b. Cache

c. Datagrams

d. DatagramSocket


Answer- Datagrams


Que-  Which of these class is necessary to implement datagrams?

a. DatagramPacket

b. DatagramSocket

c. All of the mentioned

d. None of the mentioned


Answer- All of the mentioned

Previous Post Next Post