Discussion :: Groovy
- You write a web application with groovlets. You need to get parameter of the request with name 'age' in your script. What is the best way to do this?
A.
def age = params.age ?: 0
|
B.
def age = params.age ? params.age : 0
|
C.
def age = params.name == 'age' ? params.age : "not found"
|
D.
def age = params.getAge
|
Answer : Option D
Explanation :
Be The First To Comment