R4RIN
Articles
Java 8
MCQS
Spring MCQ Quiz Hub
Spring Mcq Set 9
Choose a topic to test your knowledge and improve your Spring skills
1. To perform its logging operations.
Log4J
LogingJ
JLog
None of the mentioned
2. Log4J configuration parameters are specified inside:-
Config.groovy
Conf.groovy
Log.groovy
None of the mentioned
3. Grails application logging can be configured using:-
creating custom appenders
logging levels
console output
All of the mentioned
4. Any logging operation occurring at any of the cited packages will be logged.
True
False
none
all the mentoined
5. In Log4J parlance, each package is known as:-
parlance
logger
all of the mentioned
None of the mentioned
6. Log4J also has the following logging level:-
fatal
error
warning
all of the mentioned
7. By default, all logging message are sent to the stacktrace.groovy file.
True
False
none
all the mentoined
8. To offer versatile logging functionality:-
loggers
appenders
all of the mentioned
none of the mentioned
9. A location where logging information is sent.
appender
logger
all of the mentioned
none of the mentioned
10. A location where logging information is generated.
appender
logger
all of the mentioned
none of the mentioned
11. The default Log4J logger can be customized in a Grails application.
True
False
none
all the mentoined
12. An appender that logs to a JDBC connection.
jdbc
console
file
rollingFile
13. Command for running tests in Grails.
grails test-app
grails test
grails test-app domain class
none of the mentioned
14. Unit tests are designed to validate the logic contained in a single domain class.
True
False
none
all the mentoined
15. Method creates a mock object from a domain class.
mockForConstraintsTests
mockForConstraints
all of the mentioned
None of the mentioned
16. A Grails view can contain:-
HTML Tags
GSP or JSTL Tags
Groovy or Java code
All of the mentioned
17. A view can require a unique combination of display elements and business logic.
True
False
none
all the mentoined
18. To create custom tags.
grails create tag
grails create-tag-lib tag-lib-name
all of the mentioned
None of the mentioned
19. grails create-tag-lib tag-lib-name command creates a custom tag library under:-
/grails-app/tag/
/grails-app/
/grails-app/tag-lib/
none of the mentioned
20. 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.
True
False
none
all the mentoined
21. Custom tags can also rely on input parameters.
True
False
none
all the mentoined
22. By default, Grails assigns custom tags to:-
g: namespace
f: namespace
j: namespace
All of the mentioned
23. By default, Grails applies a global layout to display an application’s content.
True
False
none
all the mentoined
24. Grails doesn’t supports the concept of templates.
True
False
none
all the mentoined
25. Where is subdirectory called layouts located, containing the layouts available to an application?
/grails-app/view/
/grails-app/
/grails-app/view/WEB-INF
None of the mentioned
26. Tag is used to define the contents of a layout’s title section.
g:layoutTitle
g:layoutHead
g:layoutBody
g:layoutMeta
27. Tag is used to define the contents of a layout’s head section.
g:layoutTitle
g:layoutHead
g:layoutBody
g:layoutMeta
28. Tag allows any view inheriting this layout automatic access to JavaScript libraries.
g:javascript library=”application”
g:javascript library=”application”
g:layoutBody
g:layoutMeta
29. A view’s body content is inside the:-
g:javascript library=”application”
g:layoutHead
g:layoutBody
g:layoutMeta
30. GORM dynamic finder comparators:-
InList
LessThan
LessThanEquals
All of the mentioned
31. The main mission of Spring Roo is fundamentally and sustainably improve Java developer productivity without compromising engineering integrity or flexibility.
True
False
none
all the mentoined
32. Library which helps Spring Roo in using of the command line shell.
JTag
JLine
JHib
None of the mentioned
33. To check version of Maven.
mvn –v
mvn -v
mvn –version
All of the mentioned
34. To confirm Roo version.
roo.sh
roo
roo quit
roo.sh quit
35. The Spring Roo shell is a blank slate. It represents the ultimate user interface for Spring Roo to facilitate development.
True
False
none
all the mentoined
36. Spring Roo supports tab completion.
True
False
none
all the mentoined
37. You can ask Roo questions using:-
tab
hint
all of the mentioned
none of the mentioned
38. Spring Roo file extension is:-
.xml
.xhtml
.roo
.groovy
39. To run the script:-
roo.sh script –file ~/Desktop/myapp.roo
roo.sh –file ~/Desktop/myapp.roo
all of the mentioned
None of the mentioned
40. Maven Directory to hold the non–unit-test Java files for your application.
src/main/java
src/main/resources
src/main/webapp
src/test/java
41. Maven Directory which holds classpath resources that aren’t Java class files.
src/main/java
src/main/resources
src/main/webapp
src/test/java
42. Maven Directory which is used to hold the rest of a web application’s structure.
src/main/java
src/main/resources
src/main/webapp
src/test/java
43. This directory holds artifacts intended to test the Java classes under the src/main/java folder.
src/test/java
src/main/resources
src/main/webapp
src/test/java
44. This directory holds resources needed by your test classes at test time.
src/test/java
src/test/resources
src/main/webapp
src/test/java
45. To package the project using the Roo shell.
perform package
roo.sh
all of the mentioned
none of the mentioned
46. The plugin, which provides Maven support to Eclipse
m2eclipse
m2plugin
plugin
None of the mentioned
47. Spring Roo provides very powerful support to bootstrap most solutions.
True
False
none
all the mentoined
48. A database and some sort of persistence mechanism using command:-
persistence setup –database HYPERSONIC_IN_MEMORY –provider HIBERNATE
persistence setup –database HYPERSONIC_IN_MEMORY –provider
persistence setup –database HYPERSONIC_IN_MEMORY
persistence –database HYPERSONIC_IN_MEMORY –provider HIBERNATE
49. persistence setup –database HYPERSONIC_IN_MEMORY –provider HIBERNATE command creates files:-
src/main/resources/META-INF/persistence.xml
src/main/resources/META-INF/spring/database.properties
all of the mentioned
None of the mentioned
50. The file which contains useful configuration for Hypersonic in-memory database.
src/main/resources/META-INF/spring/database.properties
src/main/resources/META-INF/persistence.xml
src/main/resources/META-INF/pom.xml
None of the mentioned
Submit