Networking
- Which class represents an Internet Protocol address?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
InetAddress represents an Internet Protocol address. It provides static methods like getByAddress(), getByName() and other instance methods like getHostName(), getHostAddress(), getLocalHost().
- What does local IP address start with?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Local IP addresses look like 10.X.X.X, 172.X.X.X, or 192.168.X.X.
- What happens if IP Address of host cannot be determined?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
UnknownHostException is thrown when IP Address of host cannot be determined. It is an extension of IOException.
- What is the output of this program?
import java.lang.reflect.*;
public class Additional_packages_Example
{
public static void main(String args[])
{
try
{
Class obj = Class.forName("java.awt.Dimension");
Field fields[] = obj.getFields();
for (int k = 0; k < fields.length; k++)
System.out.println(fields[k]);
}
catch (Exception e)
{
System.out.print("Exception");
}
}
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Program prints all the data members of ‘java.awt.Dimension’ package
- Which of the following is used for session migration?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Session migration is done by persisting session in database. It can also be done by storing session in memory on multiple servers.