MCQOPTIONS
Saved Bookmarks
| 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 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"); } } } |
| A. | Program prints all the methods of java.awt.Dimension package |
| B. | Program prints all the data members of java.awt.Dimension package |
| C. | program prints all the methods and data member of java.awt.Dimension package |
| D. | Program prints all the constructors of java.awt.Dimension package |
| E. | None of these |
| Answer» C. program prints all the methods and data member of java.awt.Dimension package | |