<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">// interfaces

interface Test {
    int K = 1;  // constant
    int calc(); // abstract method
} // interface Test

class Data implements Test {
    Data() {}
    public int calc() {
	return K*K;
    } // method calc
} // class Data1

public class interface1 {
    public static void main(String args[]) {

	// instantiate objects
	Data d = new Data();
	System.out.println(d.calc());

    } // method main
} // class interface1

/* Output
1
*/
</pre></body></html>