PathVariable Mappings

Report a typo

Complete the @GetMapping annotation so that it contains a PathVariable named id:

Java
@GetMapping("/task/_______")
public Task getTasks(@PathVariable int id) {		
    return tasks.get(id);
}
Kotlin
@GetMapping("/task/_______")
fun getTasks(@PathVariable id: Int): Task {
    return tasks.get(id)
}
Enter a short text
___

Create a free account to access the full topic