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");
}
}
}

A. Program prints all the methods of java.awt.Dimension package
B. Program prints all the constructors of java.awt.Dimension package
C. program prints all the methods and data member of java.awt.Dimension package
D. Program prints all the data members of java.awt.Dimension package
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs