O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

O LEVEL-PAPER 2nd -- M2-R4 :


INTERNET TECHNOLOGY & WEB DESIGN




THESE ARE THE QUESTIONS WHICH FREQUENTLY ASKED IN 

  LAST 10 YEARS -----




Differences Between Java and JavaScript  and 


Definition of HTML


 



Java and JavaScript are the programming languages primarily used for the different purposes. Although they sound similar but there are not many similarities between them, in fact, they are different. Java is essentially be used as a general-purpose programming language while JavaScript is used as client-side scripting language. Java is both compiled and interpreted language while the browser interprets JavaScript.



The JavaScript uses prototype objects, and these objects help in accessing other objects directly without any instance of a class whereas Java is a language constructed on the principle of class where the properties of the class are inherited through the instance of a class.


BASIS FOR COMPARISON
JAVA
JAVASCRIPT
Developed by
Sun Microsystems
Netscape
Basic
Statically typed
Dynamically typed
Type of objects
Class-based
Prototype-based
Object encapsulation
Effective
Does not provide
Presence of namespace
Used in Java.
Does not contain namespaces
Multithreading
Java is multithreaded.
No provision for multithreading.
Scope
Block level
Function




           

Key Differences Between Java and JavaScript


1.   Java was invented by the Sun Microsystems (now Oracle’s) while Netscape (owned by Mozilla) developed JavaScript.
2.   Java is statically typed, means that the type of variable, parameters and members of the object are known to the compiler at the compile time. As against, JavaScript is dynamically typed where the type of variables are not known to the compiler and can be changed at the time of execution.
3.   Java is a class-based language signifies that the defined classes invoke the objects. On the other hand, JavaScript relies on prototype means that the generalized objects having ability to be doubled and extended can share properties and methods of an object.
4.   The encapsulation in java is better than JavaScript.
5.   JavaScript does not contain namespaces. In contrast, Java has the namespaces.
6.   Java supports multithreading where multiple programs can be executed at the same time. On the contrary, the JavaScript doesn’t support multithreading feature.
7.   The scope in java is block based where the variable goes out scope when control reaches out of block only till it’s not an instance or class variable. Conversely, in JavaScript function based scoping is used where the variable could be accessed inside the function it is declared.




Definition of HTML



HTML is a markup language for defining web documents(web pages). HTML expands to Hyper Text Markup language, it adds “markups” to Standard English text. “Hyper text” signify the links – Hyper links – that associates web pages with one another.
A markup language is a group of markup tags which define the page structure. Each HTML tag describes different document content. HTML is growing language which changes frequently, and a revised group of standards and specifications are brought permitting the simpler creation of appealing and more functional sites.
HTML is not case sensitive.

Example:

·         HTML tags are fundamentally keywords (tag names) which is enclosed in angle brackets and usually come in a pairs.
<tagname> content </tagname>

·         HTML element describes a specific section on a webpage.
·         Content are the texts, links, images, or other information displayed on your webpage.
·         Start tag is an HTML element used to indicate the beginning of the element.
·         End tag closes the HTML element to differentiate individual elements.

Comments

Popular posts from this blog

Important Announcements(download all my book free)

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

Call by Reference with Pointer in C Language part-4-a