Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. A bean can have more than one name using multiple id attributes?
Correct Answer is : TRUE
2. Bean’s naming convention:-
starts with lowercase, camelcase from then on.?
Correct Answer is : TRUE
3. Beans can be created by which of the following properties?
Correct Answer is : All of the mentioned
4. The bean instance is mentioned by the factory-method attribute, while the factory method is signified by the factory-bean attribute?
Correct Answer is : FALSE
5. One factory class can also hold more than one factory method True/False?
Correct Answer is : TRUE
6. Snippet of Code:
public class CreatePro
{
String ProductId;
public CreatePro(String ProductId)
this.ProductId = ProductId;
}
public static Product creation_Product(String productId)
{
System.out.println("Bean Created");
if ("aaa".equals(productId))
{
return new Battery("AAA", 2.5);
}
else if ("cdrw".equals(productId))
{
return new Disc("CD-RW", 1.5);
}
}
slight change in XML file:-
What will be the output:-
Correct Answer is : New Product will be created
7. Instance Factory method main purpose is to encapsulate the object-creation process in a method of another object instance.
Correct Answer is : TRUE
8. Which Attribute is used to specify the bean declared?
Correct Answer is : factory-bean
9. A Grails view can contain:-
Correct Answer is : All of the mentioned
10. A view can require a unique combination of display elements and business logic.
Correct Answer is : TRUE
11. To create custom tags.
Correct Answer is : grails create-tag-lib tag-lib-name
12. grails create-tag-lib tag-lib-name command creates a custom tag library under:-
Correct Answer is : /grails-app/tag-lib/
13. In order for this custom tag to function properly in JSP, it’s necessary to add it to the corresponding Tag Library Definition (TLD) grails.tld.
Correct Answer is : TRUE
14. Custom tags can also rely on input parameters.
Correct Answer is : TRUE
15. By default, Grails assigns custom tags to:-
Correct Answer is : g: namespace
16. By default, Grails applies a global layout to display an application’s content.
Correct Answer is : TRUE
17. Grails doesn’t supports the concept of templates.
Correct Answer is : FALSE
18. Where is subdirectory called layouts located, containing the layouts available to an application?
Correct Answer is : /grails-app/view/
19. Tag is used to define the contents of a layout’s title section.
Correct Answer is : g:layoutTitle
20. Tag is used to define the contents of a layout’s head section.