InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Which widget represents a single line text box in GWT? |
|
Answer» TextBox widget represents a single line text box. |
|
| 52. |
Which widget acts as a suggestion box in GWT? |
|
Answer» SuggestBox widget represents a text box or text area which displays a pre-configured set of selections that match the user's input. Each SuggestBox is associated with a single SuggestOracle. The SuggestOracle is used to provide a set of selections given a specific query string. |
|
| 53. |
Which widget represents a list of choices to the user, either as a list box or as a drop-down list in GWT? |
|
Answer» ListBox widget represents a list of choices to the user, either as a list box or as a drop-down list. |
|
| 54. |
Which widget represents a mutually-exclusive selection radio button widget in GWT? |
|
Answer» RadioButton widget represents a mutually-exclusive selection radio button widget. |
|
| 55. |
Which widget represents a standard check box widget. This class also serves as a base class for RadioButton in GWT? |
|
Answer» CheckBox widget represents a standard check box widget. This class also serves as a base class for RadioButton. |
|
| 56. |
Which widget represents a stylish stateful button which allows the user to toggle between up and down states in GWT? |
|
Answer» ToggleButton widget represents a stylish stateful button which allows the user to toggle between up and down states. |
|
| 57. |
Which widget represents a normal push button with custom styling in GWT? |
|
Answer» PushButton represents a normal push button with custom styling. |
|
| 58. |
Which widget represents a standard push button in GWT? |
|
Answer» Button widget represents a standard push button. |
|
| 59. |
What is the purpose of Anchor widget of GWT? |
|
Answer» This widget represents a simple <a> element. |
|
| 60. |
What is the purpose of Image widget of a GWT? |
|
Answer» This widget displays an image at a given URL. |
|
| 61. |
What is the purpose of HTML widget of a GWT? |
|
Answer» This widget can contain HTML text and displays the html content using a <div> element, causing it to be displayed with block layout. |
|
| 62. |
What is the purpose of Label widget of a GWT? |
|
Answer» This widget contains text, not interpreted as HTML using a <div>element, causing it to be displayed with block layout. |
|
| 63. |
Explain Widget class. |
|
Answer» The class Widget is the base class for the majority of user-interface objects. Widget adds support for receiving events from the browser and being added directly to panels. |
|
| 64. |
Explain UIObject class. |
Answer»
|
|
| 65. |
Which class is the superclass of all user-interface classes? |
|
Answer» The class UIObject is the superclass for all user-interface objects. |
|
| 66. |
How you can attach a CSS file with your GWT module? |
|
Answer» There are multiple approaches for associating CSS files with your module. Modern GWT applications typically use a combination of CssResource and UiBinder.
|
|
| 67. |
What is the difference between primary style and secondary styles of a GWT Widget? |
|
Answer» By default, the primary style name of a widget will be the default style name for its widget class. For example, gwt-Button for Button widgets. When we add and remove style names using AddStyleName() method, those styles are called secondary styles. The final appearance of a widget is determined by the sum of all the secondary styles added to it, plus its primary style. You set the primary style of a widget with the setStylePrimaryName(String) method. |
|
| 68. |
What is the purpose of setStylePrimaryName() function of a GWT widget? |
|
Answer» This method sets the object's primary style name and updates all dependent style names. |
|
| 69. |
What is the purpose of getStyleName() function of a GWT widget? |
|
Answer» This method gets all of the object's style names, as a space-separated list. |
|
| 70. |
What is the purpose of removeStyleName() function of a GWT widget? |
|
Answer» This method will remove given style from the widget and leaves any others associated with the widget. |
|
| 71. |
What is the purpose of addStyleName() function of a GWT widget? |
|
Answer» This method will add a secondary or dependent style name to the widget. A secondary style name is an additional style name that is,so if there were any previous style names applied they are kept. |
|
| 72. |
What is the purpose of setStyleName() function of a GWT widget? |
|
Answer» This method will clear any existing styles and set the widget style to the new CSS class provided using style. |
|
| 73. |
Do GWT compiler creates default Id attribute for its Widget by default? |
|
Answer» No! By default, neither the browser nor GWT creates default id attributes for widgets. |
|
| 74. |
What is the default style name of any GWT widget? |
|
Answer» By default, the class name for each component is gwt-<classname>. For example, the Button widget has a default style of gwt-Button and similar way TextBox widgest has a default style of gwt-TextBox. |
|
| 75. |
What is the purpose of Host Page? |
|
Answer» The most important public resource is host page which is used to invoke actual GWT application. A typical HTML host page for an application might not include any visible HTML body content at all but it is always expected to include GWT application via a <script.../> tag. |
|
| 76. |
Why should a .nocache.js file never be cached? |
|
Answer» GWT compiler generates .nocache.js file every time with the same name whenever a GWT application is compiled. So browser should always download the .nocache.js file to get the latest gwt application. gwt.js code actually appends a unique timestamp at the end of the file name so that browser always treat it a new file and should never cache it. |
|
| 77. |
Explain bootstrap procedure for GWT application. |
|
Answer» Following are the steps of bootstrap proceure for GWT application when a browser loads the GWT application −
|
|
| 78. |
What is .cache.html file in GWT? |
|
Answer» It contains the actual program of a GWT application. |
|
| 79. |
What is *.nocache.js file in GWT? |
|
Answer» It contains the javascript code required to resolve deferred binding configuarations (for example, browser detection) and to use lookup table generated by GWT compiler to locate one of the .cache.html. |
|
| 80. |
What is an entry-point class? |
|
Answer» A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method gets called. |
|
| 81. |
What is the purpose of 'stylesheet' tag in *.gwt.xml file in GWT? |
|
Answer» Automatically injects the external CSS file located at the location specified by src. |
|
| 82. |
What is the purpose of 'script' tag in *.gwt.xml file in GWT? |
|
Answer» Automatically injects the external JavaScript file located at the location specified by src. |
|
| 83. |
What is default public path for static resources in GWT application? |
|
Answer» The default public path is the public subdirectory underneath where the Module XML File is stored. |
|
| 84. |
What is the purpose of 'public' tag in *.gwt.xml file in GWT? |
|
Answer» The public path is the place in your project where static resources referenced by your GWT module, such as CSS or images, are stored. |
|
| 85. |
What is the purpose of 'source' tag in *.gwt.xml file in GWT? |
|
Answer» This specifies the names of source folders which GWT compiler will search for source compilation. |
|
| 86. |
How onModuleLoad() functions get called if multiple entry-point classes are specified in *.gwt.xml? |
|
Answer» They are called sequentially in the order in which entry-point classes appear in the module file. So when the onModuleLoad() of your first entry point finishes, the next entry point is called immediately. |
|
| 87. |
Which method of a entry-point class is called when GWT application starts? |
|
Answer» onModuleLoad() function gets called and acts similar to main method of a java application. |
|
| 88. |
What is the purpose of 'entry-point' tag in *.gwt.xml file in GWT? |
|
Answer» This specifies the name of class which will start loading the GWT Application. |
|
| 89. |
What is the purpose of 'inherits' tag in *.gwt.xml file in GWT? |
|
Answer» This adds other gwt module in application just like import does in java applications. Any number of modules can be inherited in this manner. |
|
| 90. |
What is the purpose of 'module' tag in *.gwt.xml file in GWT? |
|
Answer» This provides name of the application. |
|
| 91. |
What is Module descriptor in GWT? |
|
Answer» A module descriptor is the configuration file in the form of XML which is used to configure a GWT application. A module descriptor file extension is *.gwt.xml, where * is the name of the application and this file should reside in the project's root. |
|
| 92. |
What are the components of a GWT application? |
|
Answer» A GWT application consists of following four important parts out of which last part is optional but first three parts are mandatory −
|
|
| 93. |
What are the core components of GWT? |
|
Answer» Following are the core components of GWT −
|
|
| 94. |
What are the disadvantages of GWT? |
|
Answer» Following are the disadvantages of GWT −
|
|
| 95. |
Why we should use GWT? |
|
Answer» Following are the reasons to prefer GWT for development projects −
|
|
| 96. |
What are the features of GWT? |
|
Answer» Following are the features of GWT −
|
|
| 97. |
What is GWT? |
|
Answer» Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords and Orkut. |
|