Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Interface.java
Language: JAVA
Code:
interface check {
public void message();
}
public class Interface {
public static void main(String[] args) {
  try {
  check t = new check() {
  public void message() {
  System.out.println("Method defined in the interface");
  }
  };
  t.message();
  } catch (Exception ex) {
  System.out.println("" + ex.getMessage());
  }
  }
  }
Comments: