Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Placing items into the public interface of a class means??? A)any class/object t

ID: 3574008 • Letter: P

Question

Placing items into the public interface of a class means???

A)any class/object that uses objects of that class can see and use them.

B)they must be implemented as static methods and/or fields.

C)only objects of the class itself can see and use them.

D)they will not be listed in the UML specification.

A)any class/object that uses objects of that class can see and use them.

B)they must be implemented as static methods and/or fields.

C)only objects of the class itself can see and use them.

D)they will not be listed in the UML specification.

Explanation / Answer

Placing items into the public interface of a class means???

Answer: Option D)they will not be listed in the UML specification.

Explanation:

Program:

import java.io.*;
public interface MyInterface {

public String hello = "Hello";

public void sayHello();
}
public class MyInterfaceImpl implements MyInterface {
public static void main(String args[])
{
MyInterface m=new MyInterface();// It does not Override the abstract method and it cannot be instantiated
//m.sayHello();
System.out.println(MyInterface.hello);
}
}