Another repository declaration

Report a typo

Imagine we have a class:

Java
public class ComputerChair {
    private Long id;
    private String manufacturer;
}
Kotlin
class ComputerChair(
    var id: Long,
    var manufacturer: String
)

We want to declare a repository class. Which of the following declarations should we use?

Java

A)

public interface ComputerChairRepository<ComputerChair, Long> {
}

B)

public interface CrudRepository<ComputerChair, Long> {
}

C)

public interface ComputerChairRepository extends CrudRepository<ComputerChair, Long> {
}

D)

public interface ComputerChairRepository extends Repository<ComputerChair, Long> {
}
Kotlin

A)

interface ComputerChairRepository<ComputerChair, Long> {
}

B)

interface CrudRepository<ComputerChair, Long> {
}

C)

interface ComputerChairRepository : CrudRepository<ComputerChair, Long> {
}

D)

interface ComputerChairRepository : Repository<ComputerChair, Long> {
}
Select one option from the list
___

Create a free account to access the full topic