Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
12Activity
0 of .
Results for:
No results containing your search query
P. 1
Introduction to Java

Introduction to Java

Ratings: (0)|Views: 181|Likes:
Published by vasanthyogi

More info:

Published by: vasanthyogi on Dec 28, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/29/2011

pdf

text

original

 
Introduction to JAVA
This tutorial is not designed to teach a programming language or how toprogram in Java but is intended to provide an introduction to Java and getfamiliar with basic concepts of Java. This tutorial assumes that you havetaken computer science classes through CS 2308 or have equivalentexperience. Knowledge of any high level language and object oriented designwill also be extremely helpful.
 
 
TABLE OF CONTENTS
 
 
Introduction
Java is a high-level, third generation programming language, like C,FORTRAN, Smalltalk, Perl, and many others. You can use Java to writecomputer applications that crunch numbers, process words, play games,store data or do any of the thousands of other things computer software cando.
Key Differences between C++ and Java:
No pointers Just references –
Java has references but there are no pointers. This basically means there isno way for you to directly access the memory that has been reserved for anobject except through the use of the object or primitive itself. It is possible tohave multiple objects of the same type referencing the same memory.In C++ it is possible to have multiple object and primitive pointers pointingat the same block of memory and for each to operate on it in a different way.
Java is Object-Oriented
In C++ you can have functions that are not attached to classes. The mainfunction in C++ is explicitly not attached to a class.In Java, all function, including the main function, are attached to classes thatmeans within class. Everything is an object here.
Java is a Platform-Independent
When Java program is compiled; it produces a special format called
bytecode
and not executable code. Java bytecode is executed by Java run-timesystem, which is called Java Virtual Machine. In its standard form, JVM is aninterpreter for bytecode. Java bytecode is exactly the same on everyplatform. Only JVM needs to be implemented on every machine. Thus detailsof JVM differ from platform to platform. The interpreter reads the byte codeand translates it into the native language of the host machine on the fly.Since the byte code is completely platform independent, only the interpreterand a few native libraries need to be ported to get Java to run on a newcomputer or operating system. Thus due to JVM, Java becomes architectureneutral.
Java is safe and simple
Java was designed from the ground up to allow for secure execution of codeacross a network, even when the source of that code was not trusted andpossibly malicious.Furthermore Java has strong typing. Variables must be declared, andvariables do not change types when you aren't looking. Casts are strictlylimited to casts between types when you are not loosing data. Thus you cancast an int to a long but not an int to a String.Java implements a robust exception handling mechanism to deal with bothexpected and unexpected errors. The worst that an applet can do to a host

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
zm_butt2006 liked this
plutonium5x6469 liked this
Pawan Kulkarni liked this
Ing'ila Tonyua liked this
Devansh Gupta liked this
bobbkette liked this
basuprabal liked this
Michelle Schmidt liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->