Respuesta :

Answer:

The error in the given question is that  the class xyz must be abstract i.e

abstract class xyz.

Explanation:

In the given code the class xyz contain abstact method so class xyz must be abstract because abstract class contain abstract method .Abstract class contain final variable and abstract method by default all the method in abstract class is abstract and variable are final .

Syntax:

abstract class classname

{

//final variable

// abstract method

// method

}

so coorect code is

abstract class XYZ

{  public static final int A = 9;

public abstract void foo1( );

public int foo2( )

{

return 5;

}

}

ACCESS MORE
EDU ACCESS