473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What is the difference between Java and JavaScript

55
What is the difference between Java and JavaScript? Also can you use plain Java programming within webpages or can JavaScript only be used?
Jun 2 '10 #1
10 2104
@neogazz
Well as I learned. Java is object oriented programming, and Javascript is used to build more complex webpages (haven't tried using java script in webpages).

You cannot use JAVA in webpages, but you can use JAVA Applets and embed it on web pages. You create JAVA Applets in java, and embed it in web pages.
Jun 4 '10 #2
neogazz
55
Many thanks!
Jun 4 '10 #3
gits
5,390 Expert Mod 4TB
for JavaScript no plugin or JVM is needed ... any modern browser supports JavaScript out of the box ... even though there are differences in the implementation where IE mostly differs from all others since it uses its own ECMA script implementation JScript. The user might have disabled JavaScript in the browser ... so it could be that the code wouldn't run ... so in case you want to rely on it you would need a fallback. JavaScript allows you to create modern and desktop-like webpages today by using AJAX ... a technique that basically allows you to make asynchronous requests to the server and to update small or bigger parts of a webpage by using DOM methods. There are a lot of Libs/frameworks out there that provide widgets like grids, trees and provide animation/effects for them. It is much to prefer to use JavaScript instead of any other plugin-requiring techniques ... since a plugin requires an installation while JavaScript doesn't. The only real thing that cannot be done well with JavaScript today is to create images/charts ... while even this point will become less important when browsers will support canvas in the future with HTML 5.
Jun 4 '10 #4
neogazz
55
So it seems like AJAX is better than JavaScript, as the browser might have JavaScript turned off?

Can AJAX do everything that JavaScript does, also how do you start using AJAX in your webpage (i.e. do you add it in <script> tags contained in the html header of the page?
Jun 4 '10 #5
gits
5,390 Expert Mod 4TB
there is no difference - AJAX = Asyncronous JavaScript And XML ... so seen AJAX = JavaScript ... because you don't need to use XML and it doesn't need to be async ...
Jun 4 '10 #6
neogazz
55
Thanks for the info? Last thing, do you still place AJAX into the <script> container within the <head> portion of your html code?
Jun 5 '10 #7
@neogazz
Java is a programming language in which we can create console applications, windows applications, web applications and mobile applications.

And

Javascript is a client-side scripting language used in web programming.
In this many of the authentications are done on the client machine itself rather than going to the server for those processing.
This helps the server from overburdening of requests made by client.
Jun 5 '10 #8
neogazz
55
Thanks for the explaination, however do you still place AJAX into the <script> container within the <head> portion of your html code?
Jun 5 '10 #9
gits
5,390 Expert Mod 4TB
since it is JavaScript code it is to be included as JavaScript has to be included.
Jun 5 '10 #10
neogazz
55
Many many thanks! This is excellent info! Have a great weekend...
Jun 5 '10 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
0
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
0
by: jaywak | last post by:
Just tried running some code on Linux (2.4.21-32.0.1.EL and Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)) and Windows XPSP2 (with Java HotSpot(TM) Client VM (build...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
1
by: qiss | last post by:
Essentially my problem is that I have a java application that uses SHA-1 encryption and I have a .Net 2.0 WebService that needs to encrypt the same way for user authentication (passwords are...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.