Olete.in
Articles
Mock Tests
๐งช Google Web Toolkit (GWT) MCQ Quiz Hub
Google Web Toolkit multiple choice questions set 2
Choose a topic to test your knowledge and improve your Google Web Toolkit (GWT) skills
1. Which JAR has to be included in the WEB-INF/lib for deployment?
gwt-servlet.jar
gwt-user.jar
both (a) and (b)
None of These
2. To use RequestBuilder, which module do we need to inherit:
com.google.gwt.http.HTTP
com.google.gwt.http.HTTPRequesBuilde
com.google.gwt.http.RequestBuilder
com.google.gwt.request.Builder
3. Do activities contain widgets or UI code?
They can contain widgets, but not UI.
Yes, only one or the other.
No.
Yes, but only two at a time.
4. What feature us used to build XSRF protection?
The XSRF build feature.
The Token feature.
The XToken feature.
The RpcToken feature.
5. A native DOM Event can be captured using which handler?
NativeEventHandler()
NativePreviewHandler()
NativePreviewEvent()
NativeHandler()
6. What W3C specification is used in creating accessible programs with standardized DOM properties?
DOM
Area.
Aria.
PBX
7. To reduce compilation time, permutations can be used by configuring which property?
user.browser
user.agent
user.gwt
user.permutation
8. Which class is responsible for publishing click events?
Mouse class.
Button class.
Tick class.
Click class.
9. When using an asynchronous interface, what must be created before making a remote call from the client?
A dynamic interface.
A static interface.
Another asynchronous interface.
A synchronous interface.
10. A RemoteService is:
A marker interface
A service interface
A remote interface
A service class
11. Which of these is NOT a default CSS theme in GWT?
Chrome
Standard
Clean
Default
12. For Internationalization, to create a collection of formatted strings that accept parameters, which should be extended?
Messages
ResourceBundle
MessageFormat
Properties
13. A Label widget in GWT translates to which HTML asset?
Depends on inline
span
Depends on the version
div
14. An Event can be fired on the Event Bus by invoking:
EventBus.fireEvent()
HandlerManager.sendEvent()
HandlerManager.fireEvent()
GWT.sendEvent()
15. XMLHTTPRequests Same-Origin policy can be overcome with:
JSON-SO
JSON-XSR
JSON
JSONP
16. What attribute depicts the behavior of a widget?
Role.
Trim.
Action.
wAction.
17. The GWT Event Bus is built on top of:
EventManager
GWTEventManager
EventHandlerManager
HandlerManager
18. Where are XSRF tokens configured?
They are not configured.
In the conf.xml file.
In the web.xml file.
In the web.conf file.
19. Which of the following is an example of an Aria or keyboard accessibility property?
TreeItem
TabMenu
MenuTree
TreeBar
20. To handle history events, we should implement:
HistoryChangeHandler
ValueChangeHandler
HistoryChangeHandler
ValueChangeHandler
21. Which of the following tools helps optimize a Google Web Toolkit application by allowing the application to start running before all of its code is installed?
Speed Tracer
Google Web Toolkit's code splitter
Client Bundles
Lightweight Metrics
22. What is the purpose of the global collector function used in Lightweight Metrics System?
It tests the Google Web Toolkit code via the GWTTestCase class.
It speeds up the application's startup by allowing the application to start running before all of its code is installed.
It helps Google Web Toolkit programmers gain insight into what happens in the application during compilation.
It is used to evaluate and report events in the Google Web Toolkit application.
23. What is the purpose of the global collector function used in Lightweight Metrics System?
It tests the Google Web Toolkit code via the GWTTestCase class.
It speeds up the application's startup by allowing the application to start running before all of its code is installed.
It helps Google Web Toolkit programmers gain insight into what happens in the application during compilation.
It is used to evaluate and report events in the Google Web Toolkit application.
24. The google.search.SearchControl class reference of the Google AJAX Search API is used to perform a search operation in Google Web Toolkit. Which of the following methods in this class reference activates the search control object when all searchers have been added into the search control?
addSearcher
draw
execute
setLinkTarget
25. In order to use the ClientBundle in a Google Web Toolkit application, which of the following inherits tags is required to be included in the gwt.xml file?
inherits name="com.google.gwt.resources.Resources" /
inherits name="com.google.gwt.core.client" /
nherits name="com.google.gwt.json.client" /
inherits name="com.google.gwt.junit.tools" /
26. What is the response type of the Google AJAX Search API?
XML
JSON
HTML
Simple TEXT
27. In order to use the ClientBundle in a Google Web Toolkit application, Which of the following jar files is required to use the Google Chart Tools API in a Google Web Toolkit project?
gwt-servlet.jar
appengine-api-1.0-sdk-1.3.4.jar
gwt-visualization.jar
gwt-user.jar
28. Which of the following methods is used to add a split point to your code?
GWT.runAsync
GWT.getModuleName
GWTTestCase.delayTestFinish
RequestBuilder.setTimeoutMillis
29. The resources in a deployed Google Web Toolkit application are categorized as: 1)resources to never cache (.nocache.js), 2)resources to cache forever (.cache.html), 3)everything else (myapp.css) In relation to this, the ClientBundle interface moves entries from:
the never-cache category Into the cache-forever category.
the everything-else category into the cache-forever category.
the everything-else category into the never-cache category.
None of These
30. Which of the following browser rendering engines will operate if Google Web Toolkit sets doctype to HTML 4.01 Transitional?
Quirks Mode
Standards Mode
Almost Standards Mode
IE7 Mode
31. In order to use the NumberFormat or DateTimeFormat classes in a Google Web Toolkit application, which of the following inherits lines should be inserted into the Google Web Toolkit application module XML file?
inherits name="com.google.gwt.i18n.I18N"/
inherits name="com.google.gwt.resources.Resources" /
inherits name="com.google.gwt.core.client" /
inherits name="com.google.gwt.json.client" /
32. Which of the following command line utilities generates the files and folders needed to start a Google Web Toolkit project?
Apache Ant
webAppCreator
JUnit
None of These
33. Which of the following is NOT a feature of Google Web Toolkit?
Dynamic and reusable UI components
Support for full-featured Java debugging
JUnit integration
Common JavaScript errors being caught at run time
34. Which of the following components figures out which browser environment the Google Web Toolkit application is running in and determines the appropriate version of the application to load?
The host HTML page
The Bootstrap script
The Application Files
None of these
35. Which of the following Google Web Toolkit classes is used to make server calls in a Google Web Toolkit web application?
com.google.gwt.i18n.client.DateTimeFormat
com.google.gwt.i18n.client.NumberFormat
com.google.gwt.user.client.rpc
com.google.gwt.user.client.Timer
36. Using Eclipse IDE, a new Google Web Toolkit application named "MyApp" is created. Now the application directory contain some sub-directories by default. Which of the following sub-directories contains the production Java source of this web Application?
src
war
test
settings
37. Which of the following methods is used to retrieve the serialization policy file in your Google Web Toolkit webapp application directory?
ServletContext.getResource()
ServletContext.getContext()
ServletContext.getRequestDispatcher()
ServletContext.getServlet()
38. What is the data type of the argument used in the GWTTestCase.delayTestFinish method?
int
string
binary
object
39. Which of the following ClientBundle resource types can retrieve the contents of a file at runtime using URLs?
ImageResource
DataResource
ExternalTextResource
GwtCreateResource
40. While unit testing a Google Web Toolkit application in JUnit, the following line of code is added in JUnitShell: -Dgwt.args="-prod" Which of the following statements are correct with regard to the impact of adding this line of code?
It will add an argument to the JUnit TestRunner class.
It will run your unit test in manual mode.
It will override the test run from development mode to production mode.
It will run your unit test on Remote systems.
41. Which of the following interfaces in "com.google.gwt.gadgets.client" indicates that a Gadget may need to be resized automatically by the container?
NeedsAnalytics
NeedsDynamicHeight
NeedsIntrinsics
NeedsSetPrefs
42. Which of the following tags is added to a gwt.xml file in order to add Google Visualization to the Google Web Toolkit module?
inherits name='com.google.gwt.visualization.Visualization'/
inherits name="com.google.gwt.resources.Resources" /
nherits name="com.google.gwt.core.client" /
inherits name="com.google.visualization.*" /
43. Which of the following statements regarding Root panel are correct?
Root panel is the container for the dynamic elements of a Google Web Toolkit application.
Root panel is at the top of any Google Web Toolkit user interface hierarchy.
By default the Root panel wraps the body element. A host page can contain only one Root panel.
By default the Root panel wraps the body element. A host page can contain only one Root panel.
44. Which of the following approaches for associating CSS files in a Google Web Toolkit application is INCORRECT?
Using a link tag in the host HTML page.
Using the stylesheet element in the module XML file
Using a DataResource contained within a ClientBundle.
Using an inline ui:style element in a UiBinder template.
45. Which of the following statements regarding Google Web Toolkit ImageResource is INCORRECT?
Multiple ImageResources are declared in a single ClientBundle, which is a composition of many images into a single image
ImageResource results in multiple round trips for the composite images.
As the filename of the composite image is based on a hash of the file's contents, the filename will change only if the composite image is changed.
None of These
46. Which of the following Google Web Toolkit base classes combines the Google Web Toolkit test cases and reorders them so that all test cases that share a module are run back to back?
GWTTestCase
TestRunner
GWTTestSuite
JField
47. Which of the following options is INCORRECT in relation to the HTML tags and their corresponding CSS selectors in Google Web Toolkit?
button tag has button as its CSS selector.
button class="gwt-Button" has button.gwt-Button as its CSS selector.
button class="gwt-Button my-button" has button.gwt.my-Button as its CSS selector.
None of These
48. Which of the following statements is INCORRECT with regard to Google Web Toolkit components?
Google Web Toolkit Java-to-JavaScript Compiler translates the Java programming language to the JavaScript programming language.
Google Web Toolkit Development Mode allows the developers to run and execute Google Web Toolkit applications in development mode.
Google Web Toolkit Web UI supports the java.io package.
None of These
49. Which of the following Google Maps API Web Services provides the facility to convert addresses into their corresponding values in latitudes and longitudes?
Directions API
Geocoding API
Elevation API
Places API
50. In a Google Web Toolkit widget, there is a form field whose tabIndex is 2. Suppose that you change the tabIndex to -1. Which of the following options are correct with regard to this tabIndex?
The form field will be moved to the beginning of the tab sequence.
The form field will be removed from the tab sequence.
The form field is still allowed to receive focus programmatically.
The form field will be moved to the end of the tab sequence.
51. Which of the following HTML elements does the Label widget map to in Google Web Toolkit?
HTML label element
HTML div element
HTML textarea element
HTML map element
52. Which of the following statements holds true for the Navigation control present in the Google Maps API?
It displays a large pan/zoom control to be used on Google Maps.
It displays a map scale element.
It lets the user toggle between map types (such as ROADMAP and SATELLITE).
None of These
53. The Google Maps Javascript API has certain events which are classified as UI Events and MVC state change events. Which of the following options are correct with regard to this?
'click' is a UI event.
'mousedown' is an MVC state change event.
'dblclick' is a UI event.
'zoom_changed' is an MVC state change event.
54. Google Web Toolkit deploys the mini-applications created, using the Google Gadgets API. Given below are some standard tags used in a Google gadget. Identify which tag contains information such as its title, description, author, and other optional features?
Module
ModulePrefs
Content type="html"
None of these
55. Which of the following are examples of Class Annotations?
@GeneratedFrom(String fileName)
@Generate(String[] formatFQCN, String filename, String[] locales)
@Description(String desc)
@Meaning(String meaning)
56. Given below is a JSON object of a typical Lightweight Metrics System event. { moduleName : <Module name>, subSystem : <Subsystem name>, evtGroup : <Event group>, millis : <Current time in millis>, type : <Event type> } What does "subsystem" signify here?
It is the name of your Google Web Toolkit module.
It refers to the specific component that is emitting these events in the Google Web Toolkit application.
It is analogous to a grouping of related events that can be assumed to follow a serial order.
It indicates the actual method or step that was run and emitted the event.
57. In which of the following internationalization techniques do the applications look for localized strings in the module's host and do NOT need recompilation when a new locale is added?
Static String Internationalization
Dynamic String Internationalization
Localizable Interface
None of These
58. The appcfg utility is used to deploy a Google Web Toolkit web application. Which of the following appcfg commands uploads files of an application to the application's root directory? Note: The root directory location has been denoted by <war-location>.
appcfg.sh [options] update war-location
appcfg.sh [options] rollback war-location
appcfg.sh [options] update_queues war-location
appcfg.sh [options] update_indexes war-location
59. While deploying a Google Web Toolkit module on a servlet container using RPC, the servlet in the application, including Google Web Toolkit RPC servlets, will need to be defined in:
web.xml
build.xml
appengine-web.xml
module-name.gwt.xml
60. Suppose that in a Google Web Toolkit application there is a functionality called "Edit Account" which is not required initially when the application is being downloaded. Which of the following approaches should be adopted in order to optimize the initial download of the Google Web Toolkit application?
Eliminate classes or packages related to &quot;Edit Account&quot; entirely.
Set split points in the Google Web Toolkit application.
Such optimization is not possible as the code is already complied into JavaScript.
None of these
61. In order to use internationalized characters, which of the following charsets should be included in the meta tag of the host HTML file?
UTF-8
iso-8859-1
us-ascii iso8859_1
iso-8859-1;
62. ClientBundle has the two resource types - TextResource and ExternalTextResource - which provide access to static text content. Which of the following options is correct?
TextResource interns the text into the compiled JavaScript, while ExternalTextResource bundles related text resources into a single file which is accessed asynchronously.
ExternalTextResource interns the text into the compiled JavaScript, while TextResource bundles related text resources into a single file which is accessed asynchronously.
TextResource reads the content of a file using URLs, while ExternalTextResource bundles related text resources into a single file which is accessed asynchronously.
None of the above
63. In a GWT application, there is an ARIA role region that updates without having keyboard focus. Which of the following ARIA states specifies the priority of such dynamic content updates?
aria-labelledby
aria-live
aria-activedescendant
aria-expanded
64. Which of the following webAppCreator parameters defines the directory location where Google Web Toolkit web application files will be generated?
-out
-junit
moduleName
None of These
65. Which of the following interfaces includes a method to look up strings by property name and also facilitates dynamic binding to constants by name at runtime?
Constants
ConstantsWithLookup
Dictionary
Messages
66. In a Google Web Toolkit web application, the following argument is passed to the JUnitShell: -Dgwt.args="-help" What code is the first to run in a GWT application
The class Extending EntryPoint registered in your gwt.xml file.
The method public static void Main(String[] args)โ
Both A and B
None
Submit