JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Java interview questions part 3
Java interview questions part 3
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. SessionIDs are stored in cookies.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
2. What is the maximum size of cookie?
A. 4 KB
B. 4 MB
C. 4 bytes
D. 40 KB
Show Correct Answer
Correct Answer is :
4 KB
3. How can we invalidate a session?
A. session.discontinue()
B. session.invalidate()
C. session.disconnect()
D. session.falsify()
Show Correct Answer
Correct Answer is :
session.invalidate()
4. Which method creates unique fields in the HTML which are not shown to the user?
A. User authentication
B. URL writing
C. HTML Hidden field
D. HTML invisible field
Show Correct Answer
Correct Answer is :
HTML Hidden field
5. Which object is used by spring for authentication?
A. ContextHolder
B. SecurityHolder
C. AnonymousHolder
D. SecurityContextHolder
Show Correct Answer
Correct Answer is :
SecurityContextHolder
6. How does applet and servlet communicate?
A. HTTP
B. HTTPS
C. FTP
D. HTTP Tunneling
Show Correct Answer
Correct Answer is :
HTTP Tunneling
7. In CGI, process starts with each request and will initiate OS level process.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
8. Which class provides system independent server side implementation?
A. Socket
B. ServerSocket
C. Server
D. ServerReader
Show Correct Answer
Correct Answer is :
ServerSocket
9. What happens if ServerSocket is not able to listen on the specified port?
A. The system exits gracefully with appropriate message
B. The system will wait till port is free
C. IOException is thrown when opening the socket
D. PortOccupiedException is thrown
Show Correct Answer
Correct Answer is :
IOException is thrown when opening the socket
10. What does bind() method of ServerSocket offer?
A. binds the serversocket to a specific address (IP Address and port)
B. binds the server and client browser
C. binds the server socket to the JVM
D. binds the port to the JVM
Show Correct Answer
Correct Answer is :
binds the serversocket to a specific address (IP Address and port)
11. Which of the below are common network protocols?
A. TCP
B. UDP
C. TCP and UDP
D. CNP
Show Correct Answer
Correct Answer is :
TCP and UDP
12. Which class represents an Internet Protocol address?
A. InetAddress
B. Address
C. IP Address
D. TCP Address
Show Correct Answer
Correct Answer is :
InetAddress
13. What does local IP address start with?
A. 10.X.X.X
B. 172.X.X.X
C. 192.168.X.X
D. 10.X.X.X, 172.X.X.X, or 192.168.X.X
Show Correct Answer
Correct Answer is :
10.X.X.X, 172.X.X.X, or 192.168.X.X
14. What happens if IP Address of host cannot be determined?
A. The system exit with no message
B. UnknownHostException is thrown
C. IOException is thrown
D. Temporary IP Address is assigned
Show Correct Answer
Correct Answer is :
UnknownHostException is thrown
15. What is the java method for ping?
A. hostReachable()
B. ping()
C. isReachable()
D. portBusy()
Show Correct Answer
Correct Answer is :
isReachable()
16. Servlet are used to program which component in a web application?
A. client
B. server
C. tomcat
D. applet
Show Correct Answer
Correct Answer is :
server
17. Which component can be used for sending messages from one application to another?
A. server
B. client
C. mq
D. webapp
Show Correct Answer
Correct Answer is :
mq
18. How are java web applications packaged?
A. jar
B. war
C. zip
D. both jar and war
Show Correct Answer
Correct Answer is :
both jar and war
19. How can we connect to database in a web application?
A. oracle sql developer
B. toad
C. JDBC template
D. mysql
Show Correct Answer
Correct Answer is :
JDBC template
20. How can we take input text from user in HTML page?
A. input tag
B. inoutBufferedReader tag
C. meta tag
D. scanner tag
Show Correct Answer
Correct Answer is :
input tag
Similar Interview Questions
Search for latest jobs
Find Jobs