333 views
1 vote
True of False - use T or F An interface is compiled into a separate bytecode file (.class).

User Mvmn
by
5.6k points

1 Answer

2 votes

Answer:

T

Step-by-step explanation:

An interface is compiled to a separate bytecode class file.

For example of out application has a class myClass.java and an interface myInterface.java:

class myClass{

String name;

int age;

}

interface myInterface{

public String getName();

public int getAge();

}

Both of these are compiled to their own respective class files by the compiler,namely, myClass.class and myInterface.class.

User Andrew Cheong
by
5.3k points