Packages


  1. Which of this package is used for handling security related issues in a program?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    java.security handles certificates, keys, digests, signatures, and other security functions.


  1. Which of this package is used for invoking a method remotely?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    java.rmi provides capabilities for remote method invocation.



  1. What is the output of this program?
    import java.lang.reflect.*;
    public class Additional_packages_Example
    {
    public static void main(String args[])
    {
    try
    {
    Class object = Class.forName("java.awt.Dimension");
    Constructor constructors[] = object.getConstructors();
    for (int k = 0; k < constructors.length; k++)
    System.out.println(constructors[k]);
    }
    catch (Exception e)
    {
    System.out.print("Exception");
    }
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Program prints all the constructors of ‘java.awt.Dimension’ package.

    public java.awt.Dimension()
    public java.awt.Dimension(int,int)
    public java.awt.Dimension(java.awt.Dimension)


  1. What is the output of this program?
    import java.lang.reflect.*;
    public class Additional_package_Example
    {
    public static void main(String args[])
    {
    try
    {
    Class object = Class.forName("java.awt.Dimension");
    Field fields[] = object.getFields();
    for (int k = 0; k < fields.length; k++)
    System.out.println(fields[k]);
    }
    catch (Exception e)
    {
    System.out.print("Exception");
    }
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Program prints all the data members of ‘java.awt.Dimension’ package