importjava.lang.reflect.Method; publicclassGFG{ // create main method publicstaticvoidmain(Stringargs[]) { try{ // create class object for interface Shape Classc=Shape.class; // get list of Method object Method[]methods=c.getMethods(); // print Default Methods for(Methodm:methods){ // ...
*/ import java.lang.reflect.Method; public class GFG { // create main method public static void main(String args[]) { try { // create class object for interface Shape Class c = Shape.class; // get list of Method object Method[] methods = c.getMethods(); // print Default Methods ...
*/importjava.lang.reflect.Method;publicclassGFG{// create main methodpublicstaticvoidmain(String args[]){try{// create class object for interface ShapeClass c = Shape.class;// get list of Method objectMethod[] methods = c.getMethods();// print Default Methodsfor(Method m:methods) {// c...
* of Method Class. */importjava.lang.reflect.Method;publicclassGFG{// create main methodpublicstaticvoidmain(String args[]){try{// create class object for interface ShapeClass c = Shape.class;// get list of Method objectMethod[] methods = c.getMethods();// print Default Methodsfor(Method...