YouTube Icon

Interview Questions.

Top 100+ Html, Gwt, Java Interview Questions And Answers - May 31, 2020

fluid

Top 100+ Html, Gwt, Java Interview Questions And Answers

Question 1. What Is Html?

Answer :

HTML is brief for HyperText Markup Language, and is the language of the World Wide Web. It is the usual text formatting language used for creating and displaying pages at the Web. HTML documents are made up of  matters: the content and the tags that formats it for correct show on pages.

Question 2. What Are Tags?

Answer :

Content is located in between HTML tags so as to properly layout it. It uses the much less than symbol (<) and the greater than symbol (>). A scale down symbol is also used as a ultimate tag. For example:
pattern

XML Interview Questions
Question three. Do All Html Tags Come In Pair?

Answer :

No, there are single HTML tags that does not want a ultimate tag. Examples are the  tag and tags.

Question four. How Do You Insert A Comment In Html?

Answer :

Comments in html begins with “
<!–“-- “–>”.
For instance:
<!-- compuhelp -->

XML Tutorial
Question 5. Do All Character Entities Display Properly On All Systems?

Answer :

No, there are a few man or woman entities that can't be displayed when the running system that the browser is going for walks on does not guide the characters. When that happens, these characters are displayed as containers.

HTML four Interview Questions
Question 6. What Is The Purpose Of Canvas In Html?

Answer :

Canvas is an element that is used for the pics for the internet page. It makes use of JavaScript to bring the photos functionality live. It lets in easy manner to draw the pics and use different sorts of tools to create drawing on the net page. Canvas is just a rectangular location that controls the pixel of each detail that is used within the net page. Canvas uses techniques like paths, circles, and many others.
The canvas detail may be used as follows:
<canvas id="can" width="200" height="100"></canvas>
The canvas detail consists of identity, width and top settings and with the javascript it receives used like:
<script type="text/javascript">
var c=file.GetElementById("can");
var ctx=c.GetContext("second");
ctx.FillStyle="#FF0000";
ctx.FillRect(0,0,one hundred fifty,seventy five);
</script>

Question 7. What Is The Purpose Of Iframe In Html?

Answer :

Iframe is known as as inline frame that places one HTML document in a body. It isn't the same as the object element because the inline body can be made in the target frame. The goal frame consists of the links that is described by using other elements used inside the internet web page. Iframe is used to attention on printing or viewing of the source. Iframe can be used by the user in the ones browser that helps it. If they've used iframe additionally then the incompatible browser might not show the real however show of the alternative text will take region.
Syntax: <iframe>-----</iframe>

HTML 4 Tutorial HTML Interview Questions
Question 8. What Is The Main Function Of "pre" Tag In Html?

Answer :

"pre" tag defines the pre-formatted textual content this is used to display the textual content with the fixed width and uses a predefined fonts and it maintains each areas and line breaks separate and display the text as it is.
The code that may be used to display the textual content that can be written in whatever way the user wishes is as follows:
<pre>
Text in a pre element ----//
is displayed in a hard and fast-width
font, and it preserves
each spaces and
line breaks
</pre>

Question nine. How Can Tables Be Made Nested In Html?

Answer :

Tables may be made nested by making it are available any other table. This includes many attributes and tags that may be used in nesting the tables.
<table>
    <tr>
      <td>that is the first cellular</td>
      <td>that is the second mobile</td>
<table> 
<tr>
<td>this is the primary cell 2d desk</td>
<td>that is the second cell of 2d table</td>
</tr>
<table>
</td>
</tr>
</table>

HTML five Interview Questions
Question 10. How To Prevent The Display Of “getting Framed In Html?

Answer :

Getting framed refers to the record that is being displayed in someone else's frameset on your HTML. This may be password blanketed and the permissions must be taken before inserting the frameset. The framing of the file may be prevented by using using TARGET=_top implemented to all of the hyperlinks a good way to lead to the file which can be out of doors the scope of a particular user without permission. A javaScript may be used so as to mechanically cope with the request to take away the prevailing framesets. This may be given as:
<script type="text/javascript">
if (top.Frames.Duration!=0) 

    if (window.Region.Href.Replace)
       top.Region.Update(self.Area.Href);
    else
       pinnacle.Vicinity.Href=self.Report.Href;

</script>

HTML Tutorial
Question eleven. How To Include A Frame Set Inside Another Frame Set?

Answer :

One frameset may be defined interior any other frameset if the gaining access to permission are provided immediately. The frameset can be stored by means of the use of the JavaScript within the record that is being written by way of the consumer and the script is as follows:
<script TYPE="text/javascript">
if (discern.Vicinity.Href == self.Region.Href) 

    if (window.Location.Href.Replace)
       window.Location.Replace('frame.Html');
    else
       // causes problems with lower back button, however works
       window.Place.Href = 'frame.Html';

</script>

HTML+XHTML Interview Questions
Question 12. What Is Semantic Html?

Answer :

Semantic HTML is a coding fashion. It is the use of HTML markup to boost the semantics or that means of the content material. For instance: In semantic HTML
 <b> </b>
tag is not used for formidable statement as well as
<i> </i> 
tag is used for italic. Instead of those we use
<strong></strong>
and
<em></em> 
tags.

XML Interview Questions
Question 13. What Is A Marquee?

Answer :

A marquee allows you to place a scrolling text in an internet web page. To do that, area whatever text you want to seem scrolling in the <marquee> and </marquee> tags.

HTML 5 Tutorial
Question 14. What Are Empty Elements?

Answer :

HTML factors with out a content are called empty elements. For example:<br> , <hr> and so on.

Question 15. What Are The Different New Form Element Types In Html five?

Answer :

Following is a listing of 10 crucial new elements in HTML 5:

Color
Date
Datetime-neighborhood
Email
Time
Url
Range
Telephone
Number
Search
HTML+Javascript Interview Questions
Question 16. Is There Any Need To Change The Web Browsers To Support Html5?

Answer :

No. Almost all browsers (updated variations) guide HTML five. For instance: Chrome, Firefox, Opera, Safari, IE etc.

Java Tutorial
Question 17. Which Video Formats Are Supported By Html5?

Answer :

HTML 5 supports three sorts of video layout:

mp4
webm
ogg
HTML DOM Interview Questions
Question 18. What Is The Difference Between Progress And Meter Tag?

Answer :

The development tag is used to symbolize the progress of the undertaking handiest whilst the meter tag is used to measure statistics within a given variety.

HTML four Interview Questions
Question 19. Why It Is Important To Set The Meta Information?

Answer :

Metadata is the statistics approximately the facts or the information approximately the information. There is a tag <meta> this is being furnished for the HTML document. This information may not be displayed anywhere and could now not be visible to the person. It can be parsable by way of the gadget if you want to parse it in line with the requirement. It includes the factors which are related to the web page description, keywords, record associated element. The tag this is getting used resides within the  section in HTML. The meta statistics is being used by the net browser or via the search engines like google and yahoo to rank and let the consumer discover the pages easily. 

CSS Tutorial
Question 20. Is There Any Way To Keep List Elements Straight In An Html File?

Answer :

By the use of indents, you can hold the listing factors directly. If you indent each subnested list in in addition than the parent listing that contains it, you can at a look decide the various lists and the elements that it includes.

Java Interview Questions
Question 21. If You See A Web Address On A Magazine, To Which Web Page Does It Point?

Answer :

Every net web page on the web can have a separate internet address. Most of those addresses are relative to the pinnacle-most net page. The published internet cope with that looks inside magazines generally points this pinnacle-most web page. From this pinnacle level page, you may get admission to all other pages in the web website online.

Question 22. What Is The Use Of Using Alternative Text In Image Mapping?

Answer :

When you use photograph maps, it is able to easily grow to be confusing and tough to decide which hotspots corresponds with which hyperlinks. Using opportunity textual content helps you to positioned a descriptive text on each hotspot hyperlink.

 

XHTML Tutorial
Question 23. Is It Possible To Set Specific Colours For Table Borders?

Answer :

You can specify a border colour the use of fashion sheets, however the colorings for a desk that does not use style sheets might be similar to the text color.

CSS Interview Questions
Question 24. What Is The Use Of Span In Html And Give One Example?

Answer :

SPAN : Used for the following matters:
1. Highlight the any color text
2. For including colored textual content
3. For adding historical past photo to textual content.
<p>
<span style="color:#000000;">
In this web page we use span.
</span>

HTML Interview Questions
Question 25. What Is The Importance Of Doctype In Html?

Answer :

Doctype tag is not a HTML tag, it's far just an coaching this is surpassed to the internet browser to test for the facts that is being supplied by the markup language in which the web page is written. Doctype is occasionally referred as Document type definition (DTD) that describes some guidelines that needs to be accompanied while writing the markup language with the intention to make the net browser apprehend the language and the content successfully. Doctype is very essential to be placed within the starting of the HTML and earlier than the <HTML> tag to allow easy rendering of the pages which might be used.

Question 26. What Do You Know About Java?

Answer :

Java is a high-degree programming language originally advanced through Sun Microsystems and released in 1995. Java runs on a ramification of platforms, inclusive of Windows, Mac OS, and the diverse variations of UNIX.

Java Abstraction Interview Questions
Question 27. What Are The Supported Platforms By Java Programming Language?

Answer :

Java runs on a variety of structures, which include Windows, Mac OS, and the numerous versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, and so forth.

HTML five Interview Questions
Question 28. List Any Five Features Of Java?

Answer :

Some functions include

Object Oriented
Platform Independent
Robust
Interpreted
Multi-threaded
Question 29. Why Is Java Architectural Neutral?

Answer :

It’s compiler generates an structure-impartial object file format, which makes the compiled code to be executable on many processors, with the presence of Java runtime machine.

Dynamic HTML Interview Questions
Question 30. How Java Enabled High Performance?

Answer :

Java makes use of Just-In-Time compiler to permit excessive performance. Just-In-Time compiler is a program that turns Java bytecode, that's a application that consists of instructions that have to be interpreted into commands that can be sent directly to the processor.

Question 31. Why Java Is Considered Dynamic?

Answer :

It is designed to evolve to an evolving surroundings. Java packages can carry tremendous quantity of run-time information that may be used to verify and remedy accesses to gadgets on run-time.

Question 32. List Two Java Ide’s?

Answer :

Netbeans 
Eclipse
XHTML Interview Questions
Question 33. Variables Used In A Switch Statement Can Be Used With Which Datatypes?

Answer :

Variables utilized in a switch statement can only be a string, enum, byte, quick, int, or char.

HTML+XHTML Interview Questions
Question 34. What Is Protected Access Modifier?

Answer :

Variables, strategies and constructors that are declared blanketed in a superclass can be accessed simplest via the subclasses in different bundle or any magnificence in the package deal of the included participants' elegance.

Question 35. What Do You Mean By Access Modifier?

Answer :

Java provides get right of entry to modifiers to set access tiers for training, variables, techniques and constructors. A member has bundle or default accessibility while no accessibility modifier is detailed.

Question 36. What Is A Static Variable?

Answer :

Class variables additionally referred to as static variables are declared with the static keyword in a class, however outdoor a technique, constructor or a block.

HTML+Javascript Interview Questions
Question 37. When A Byte Datatype Is Used?

Answer :

This statistics kind is used to keep area in huge arrays, especially in region of integers, since a byte is four instances smaller than an int.

Question 38. What Is The Default Value Of Float And Double Datatype In Java?

Answer :

Default fee of glide and double datatype in exceptional compared to C/C++. For flow its zero.0f and for double it’s zero.0d

Question 39. What Is The Default Value Of Byte Datatype In Java?

Answer :

Default value of byte datatype is 0.

Question 40. List The Three Steps For Creating An Object For A Class?

Answer :

An Object is first declared, then instantiated after which it is initialized.

HTML DOM Interview Questions
Question forty one. What Do You Mean By Constructor?

Answer :

Constructor gets invoked when a brand new item is created. Every magnificence has a constructor. If we do no longer explicitly write a constructor for a class the java compiler builds a default constructor for that magnificence.

Question forty two. What Is Singleton Class?

Answer :

Singleton magnificence control item introduction, limiting the number to one but permitting the flexibility to create more objects if the scenario adjustments.

Java Interview Questions
Question 43. What Is A Class Variable?

Answer :

These are variables declared with in a category, outside any method, with the static key-word.

Question 44. What Is A Instance Variable?

Answer :

Instance variables are variables inside a category however outdoor any technique. These variables are instantiated whilst the class is loaded.

Question forty five. What Is A Local Variable?

Answer :

Variables described inside techniques, constructors or blocks are called local variables. The variable will be declared and initialized within the method and it'll be destroyed whilst the technique has completed.

Question 46. Define Class?

Answer :

A class is a blue print from which character gadgets are created. A class can include fields and strategies to describe the behavior of an object.

 

Question forty seven. What Do You Mean By Object?

Answer :

Object is a runtime entity and it’s kingdom is saved in fields and behavior is shown via strategies. Methods operate on an item's internal nation and serve as the primary mechanism for item-to-object communication.

Question forty eight. What Is Finalize() Method?

Answer :

It is viable to define a way so that it will be known as simply earlier than an object's very last destruction through the garbage collector. This approach is called finalize( ), and it is able to be used to make certain that an object terminates cleanly.

Question forty nine. Which Package Is Used For Pattern Matching With Regular Expressions?

Answer :

java.Util.Regex bundle

Question 50. What Is The Difference Between Stringbuffer And Stringbuilder Class?

Answer :

Use StringBuilder whenever feasible due to the fact it's far quicker than StringBuffer. But, if thread safety is vital then use StringBuffer objects.

Question 51. Why Is Stringbuffer Called Mutable?

Answer :

The String magnificence is taken into consideration as immutable, so that when it is created a String item can not be modified. If there may be a necessity to make alot of modifications to Strings of characters then StringBuffer ought to be used.

Question fifty two. How Can We Run Gwt Application?

Answer :

Two ways of strolling the software:
1) Create a battle report and deploy in any app server or
2) Run ant hosted within the command set off. And click on the ‘Launch Default Browser’.

Question 53. Can We Set Css Style In Gwt Java Code?

Answer :

The appearance and feel of a GWT utility can be custom designed through CSS files. Each widget in GWT may be given a HTML "div" box and might consequently be personally styled via CSS. You use the Java approach setStyle(String s) for this.

Question 54. What Are Modules, Entry Points And Html Pages In Gwt?

Answer :

GWT programs are described as modules. A module "modulename" is defined by means of a configuration report "modulename.Gwt.Xml". Each module can define one or extra Entry factor lessons.
An entry factor is the start line for a GWT software, much like the principle technique in a fashionable Java software. A Java elegance that's an access point must put into effect the interface "com.Google.Gwt.Middle.Customer.EntryPoint" which defines the approach onModuleLoad(). 
The module is hooked up to a HTML web page, which is referred to as "host page". The code for a GWT internet application executes inside this HTML report. 
The HTML web page can outline "div" bins to which the GWT utility can assign UI additives or the GWT UI additives are certainly assigned to the frame tag of the HTML page.

 

Question fifty five. How Many Modes Are Provided By Gwt To Execute Application?

Answer :

There are  modes: Development mode and Web mode.
Development Mode: permits to debug the Java code of your application directly thru the usual Java debugger. 
Web mode: the utility is translated into HTML and Javascript code and may be deployed to a webserver.

Question fifty six. How Can You Set Browser Targeted Compilation In Gwt?

Answer :

•To reduce the compilation time, pick preferred browser and upload the person.Agent property within the module configuration record.
Values: ie6,ie8,gecko1_8,safari,opera
module.Gwt.Xml:
<module..>
<inherits...>
<set property name="user.Agent" value="ie8,opera">
</module..>

 

Question fifty seven. How To Compile The Gwt Application?

Answer :

Run ant build within the root folder of the software. By default gwt compiler creates optimized JS files for some browsers. 
: Disadvantage is it takes a whole lot of time to assemble every exchange because of the permutations 
Steps:
1) Open command spark off
2) Go to the application root folder
three) Run command as "ant construct"
Then you may see bring together logs are coming. If you see BUILD SUCCESSFUL it means no mistakes on your application. If BUILD FAILED it approach there may be an blunders in your software.

Question fifty eight. How To Create A Gwt Application?

Answer :

•Create a folder for the application (e.G. Withoutbook)
•Run webAppCreator in the newly created folder
–webAppCreator takes a module name (right here 'withoutbook' is the module name with a package deal prefix)

Question fifty nine. What Is Gwt Rpc?

Answer :

RPC, Remote Procedure Call is the mechansim utilized by GWT in which purchaser code can immediately executes the server aspect techniques.
GWT RPC is servlet based totally.
GWT RPC is asynchronous and customer is by no means blocked at some point of communique.
Using GWT RPC Java objects can be sent at once among the patron and the server (which might be robotically serialized through the GWT framework).
Server-side servlet is called as provider.
Remote system name this is calling methods of server side servlets from customer side code is called invoking a service.
Question 60. What Are The Core Components Of Gwt Rpc?

Answer :

Following are the 3 components used in GWT RPC verbal exchange mechanism:

A remote provider (server-side servlet) that runs on the server.
Client code to invoke that carrier.
Java data gadgets if you want to be handed between patron and server.
GWT patron and server each serialize and deserialize data mechanically so builders are not required to serialize/deserialize items and facts items can journey over HTTP.
 

Question 61. Which Interface A Java Data Object Should Implement So That It Can Be Transferred Over The Wire In Gwt Rpc?

Answer :

A java facts item need to put into effect isSerializable interface so that it may be transferred over the twine in GWT RPC.

Question 62. What Is Internationalization?

Answer :

Internationalization is a way to expose locale unique facts on a website. For instance, show content material of a internet site in English language in United States and in Danish in France.

Question sixty three. What Are The Ways Using Which You Can Internationalize A Gwt Application?

Answer :

GWT presents three approaches to internationalize a GWT software −

Static String Internationalization.
Dynamic String Internationalization.
Localizable Interface.
Question 64. What Is Static String Internationalization Technique In Gwt?

Answer :

This method is most widely wide-spread and requires little or no overhead at runtime; is a very efficient method for translating both consistent and parameterized strings;only to implement. Static string internationalization uses standard Java houses files to keep translated strings and parameterized messages, and strongly-typed Java interfaces are created to retrieve their values.

Question sixty five. What Is Dynamic String Internationalization Technique In Gwt?

Answer :

This technique is very bendy but slower than static string internationalization. Host web page includes the localized strings therefore, programs aren't required to be recompiled when we upload a brand new locale. If GWT software is to be integrated with an current server-facet localization machine, then this method is to be used.

Question sixty six. What Is Localizable Interface Internationalization Technique In Gwt?

Answer :

This method is the maximum powerful a few of the three techniques. Implementing Localizable permits us to create localized versions of custom types. It's an advanced internationalization approach.

Question 67. Which Tag Of *.Gwt.Xml Is Used To Support Internationalization In Gwt Application?

Answer :

expand-belongings tag with characteristic name set as locale and values as language precise locale, say de for german locale.

 

Question sixty eight. What Is Simpleremoteloghandler In Gwt?

Answer :

This handler sends log messages to the server, where they will be logged using the server side logging mechanism.


Question sixty nine. What Is Popuploghandler In Gwt?

Answer :

PopupLogHandler logs to the popup which resides in the top left hand corner of application whilst this handler is enabled.

 

Question 70. What Is Firebugloghandler In Gwt?

Answer :

FirebugLogHandler logs to Firebug console.

Question 71. What Is Consoleloghandler In Gwt?

Answer :

ConsoleLogHandler logs to the javascript console, that is utilized by Firebug Lite (for IE), Safari and Chrome.

Question seventy two. What Is Developmentmodeloghandler In Gwt?

Answer :

DevelopmentModeLogHandler logs via calling method GWT.Log. These messages can simplest be visible in Development Mode within the DevMode window.

 

Question seventy three. What Is Systemloghandler In Gwt?

Answer :

SystemLogHandler logs to stdout and those messages can most effective be seen in Development Mode inside the DevMode window.

Question 74. How Can You Create A Custom Gwt Widget?

Answer :

GWT offers three approaches to create custom person interface elements. There are 3 popular techniques to observe −

Create a widget via extending Composite Class − This is the maximum commonplace and easiest manner to create custom widgets. Here you can use existing widgets to create composite view with custom residences.
Create a widget using GWT DOM API in JAVA − GWT basic widgets are created on this way. Still its a very complicated way to create custom widget and have to be used cautiously.
Use JavaScript and wrap it in a widget the usage of JSNI − This need to typically best be achieved as a last inn. Considering the pass-browser implications of the local methods, it turns into very complicated and additionally will become more difficult to debug.
Question 75. What Is Gwt Uibinder?

Answer :

The UiBinder is a framework designed to split Functionality and View of User Interface.
The UiBinder framework lets in builders to construct gwt programs as HTML pages with GWT widgets configured at some stage in them.
The UiBinder framework makes less difficult collaboration with UI designers who are greater cozy with XML, HTML and CSS than Java supply code.
The UIBinder affords a declarative way of defining User Interface.
The UIBinder seperates the programmic logic from UI.
The UIBinder is similar to what JSP is to Servlets.




CFG