ExamVeda
Login
Home
51
Which of these class is used to access actual bits or content information of a URL?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following Java program?
import java.net.*;
public class networking 
{
    public static void main(String[] args) throws UnknownHostException 
    {
        InetAddress obj1 = InetAddress.getByName("cisco.com");
        InetAddress obj2 = InetAddress.getByName("example.com");
        boolean x = obj1.equals(obj2); 
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
53
Which of these method of DatagramPacket class is used to find the destination address?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
What will be the output of the following Java program?
import java.net.*;
class networking 
{
    public static void main(String[] args) throws UnknownHostException 
    {
        InetAddress obj1 = InetAddress.getByName("example.com");
        InetAddress obj2 = InetAddress.getByName("example.com");
        boolean x = obj1.equals(obj2); 
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
55
Which of these method of DatagramPacket is used to find the port number?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
56
Which of these variables stores the number of hits that are successfully served out of cache?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
57
What will be the output of the following Java program?
import java.io.*;
class streams
{
    public static void main(String[] args)
    {
        try
        {
      FileOutputStream fos = new FileOutputStream("serial");
      ObjectOutputStream oos = new ObjectOutputStream(fos);
      oos.writeFloat(3.5);
      oos.flush();
      oos.close();
  }
  catch(Exception e)
        {
      System.out.println("Serialization" + e);
            System.exit(0);
        }
  try
        {
      FileInputStream fis = new FileInputStream("serial");
      ObjectInputStream ois = new ObjectInputStream(fis);
      System.out.println(ois.available());		    	
  }
  catch (Exception e) 
        {
            System.out.print("deserialization");
      System.exit(0);
  }
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
58
What is deserialization?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
59
What will be the output of the following Java program?
import java.net.*;
class networking
{
    public static void main(String[] args) throws Exception 
    {
        URL obj = new URL("https://www.example.com/javamcq");
        URLConnection obj1 = obj.openConnection();
        int len = obj1.getContentLength();
        System.out.print(len);
    }
}

Note: Host URL is having length of content 127.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
60
Which of these method is called when http daemon is acting like a normal web server?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board