• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introduction To Java.
 

Introduction To Java.

on

  • 3,291 views

In This Presentation You See a brief history of java and all major topic like packege,util class and More.

In This Presentation You See a brief history of java and all major topic like packege,util class and More.
Enjoy........

Statistics

Views

Total Views
3,291
Views on SlideShare
3,016
Embed Views
275

Actions

Likes
2
Downloads
234
Comments
1

10 Embeds 275

http://www.ustudy.in 206
http://tusharosum.blogspot.com 41
http://ustudy.in 7
http://feeds.feedburner.com 5
http://theoldreader.com 4
http://tusharosum.blogspot.in 4
http://www.tusharosum.blogspot.com 4
http://www.slideshare.net 2
http://tusharosum.blogspot.pt 1
http://www.blogger.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • hey bro its so use full
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Ahora vamos a hablar acerca de las diferentes plataformas Java existentes que permiten desarrollar aplicaciones en una aplica gama de dispositivos y contextos. Java Card es el plataforma que permite desarrollar software para dispositivos pequeños que utilizan tarjetas inteligentes y software empotrado como lectoras de código de barras o lectoras de tarjetas de créditos. Esta plataforma es más utilizada por los fabricantes de estos dispositivos. Con la versión 1.2, Java se separó en tres plataformas: J2SE (ahora Java SE), J2EE (ahora Java EE) y J2ME (ahora Java ME). La primera de ellas conserva el núcleo original del lenguaje y sus APIs y está pensada para el desarrollo de aplicaciones de escritorio y applets. Cubre muchas funcionalidades como soporte de GUI con Swing y AWT, I/O, multithreading, etc. Java EE es la plataforma para desarrollo de aplicaciones Web empresariales y grandes sistemas distribuidos. Ser encarga de la interacción entre servidores de aplicaciones y de bases de datos, persistencia de datos, seguridad, etc. Java ME es la plataforma que permite que nosotros podamos escribir aplicaciones para nuestros propios celulares, PDAs y PocketPCs. Java ME utiliza solo una parte de las APIs de Java SE y suministra sus propias bibliotecas de soporte. Por último tenemos a Java FX, la plataforma más reciente de Java y que pretende competir con Adobe y Flash y con Microsoft y Silverlight en el desarrollo de aplicaciones RIA (Rich Internet Applications). Estas aplicaciones se caracterizan por ejecutarse en los navegadores y tener una interfaz gráfica muy rica en cuanto a gráficos e interacción con el usuario. Java FX introduce su propio lenguaje script.
  • En este gráfico podemos apreciar como se distribuye el soporte de los diferentes dispositivos existentes entre las 3 plataformas principales de Java. Podemos apreciar que existen múltiples tipos de máquinas virtuales, como la CVM, KVM y la JVM.
  • In order to land high paying jobs, students need to find ways to differentiate themselves from other recent graduates. Through the Sun Academic Initiative, Sun offers free training that will help you fast-track your career. As an example, a recent article in CIO Magazine included the Sun Certified Programmer for Java 2 platform and the Sun Certified Systems Administrator for Solaris as two of the hot certifications that are able to demand higher wages. Refer to the hand-out with instructions for online registration and certification exams.

Introduction To Java. Introduction To Java. Presentation Transcript

  • Introduction to Java Tushar Chauhan Osum Leader C.U.Shah College Of Engineering & Technology, Wadhwan City
  • Agenda
    • What is Java?
    • A little bit of history
    • Java performance
    • Java sintax
    • Java packages
    • Java applications
    • Demo
    • Where and how to learn Java
  • What is Java???
  • An exotic island...? Friendly people, spicy food, beautiful beaches
  • An IT Brand?
  • What is Java?
    • An object oriented programming language developed in the early '90s.
    • The language itself takes much of its syntax from C and C + + but has a simpler object model and eliminates low-level tools.
    • It is platform independent. Early implementations of Java had the slogan: "write once, run anywhere"
    • It has a system of automatic memory management.
  • A programming language
  • A platform
  • And where is Java? Java is everywhere...
  • Where is Java? It's here...
  • Where is Java? And here...
  • Where is Java? And here...
  • A little bit of history
  • A little bit of history
    • It was conducted by a team of 13 people, led by James Gosling.
    • Gosling's goals were to implement a virtual machine and a language with a structure and syntax similar to C + +.
    • Java was originally created as a programming tool for a project set-top box known as * 7.
  • A little bit of history (II)
    • The language was originally called "Oak". Later renamed "Green" after discovering that Oak was already a trademark.
    • The term "Java" was coined in a coffee store frequented by members of the team.
    • It is unclear if it is an acronym or not, some hypotheses suggest that it could be the initials of its creators: J ames Gosling, A rthur V an Hoff, and A ndy Bechtolsheim. Other advocates of " J ust A nother V ague A cronym.
    • The most accepted hypothesis is that Java is named after a type of coffee available in the coffee store.
  • Java Architecture
  • .java, .class, JVM???
    • In Java, source code is written in a plain text file with a .Java extension
    • Then, the code is compiled into a .Class file. A .Class does not contain native code for a type of processor, instead it contains bytecodes.
    • Finally, the application is interpreted by the Java virtual machine, transforming the bytecode to native code at runtime.
  • Bytecode
    • The bytecode is the native language of any implementation of Java Virtual Machine. In this way, a Java program runs on any platform with a JVM.
  • Java platform Java Card Java SE Java EE Java ME Java FX
  • Java platform D:My PresentationUnijoyo Java Presentationimgjava platform.gif
  • Java Language
    • Object oriented
    • Distributed
    • Simple
    • Multithread
    • Safe
    • Platform independent
  • Some concepts...
    • Distributed: Java is distributed because it offers support for distributed network technologies such as RMI (remote method invocation), CORBA (common object request broker architecture) and URI (universal resource locator)
    • Simple: No pointers, no garbage collector
    • Multithreading
    • Safe: restrictions on access to devices directly (pointers)
  • Java syntax
  • Java syntax in detail Variable initialization
    • The Java language is strongly typed, which means that all variables must be declared before use.
    int unaVariable = 1;
  • String Class
    • Java provides special support for the strings via the java.lang.String class
    • It is not a primitive type.
    • However, by overloading operators you can perform operations such as:
    String unString = “Juan” + “ ” + “Perez” ;
    • Java also provides a wide range of operations to manipulate instances of this class.
  • Example with arithmetic operators int i=2+3; // i equals 5 i=i+1; //i equals 6 i=6*2; //i equals 12 i=2+5*2%8; //i equals 4
  • Example with posfix and unary operators int i=5; // i equals 5 System.out.println(i); //print:5 System.out.println(++i); //print:6 System.out.println(i++); //print:6 System.out.println(i); //print:7
  • Control sentences: if if(expr){ .... } if(expr) sentencia; if(expr){ .... } else { .... }
  • Control sentences: switch Switch (num){ case num1:...break; case num2:...break; default:...break; }
  • Control sentences: while and do-while while (expr){ .... } do { .... }while(expr);
  • Control sentences: for for (exprInic; stopCond; nextStep){ .... } for (int i=0; i<10; i++) { System.out.println(i); } //print numbers from 0 to 9
  • Java Packages
  • Java program structure
    • The object-oriented programming structure is that each program is a simulation of a real or virtual world.
    • Each of these worlds are composed of objects .
    • Objects communicate through messages.
    • Therefore, an object-oriented program is nothing more than a configuration of a set of objects and messages sent between them.
    • The &quot;box&quot; that holds the description of all objects of the same type is what is known as a class.
    • In turn, the classes with similar purposes can be grouped into packages.
    • The program execution begins at the &quot;main&quot; method of a class.
  • Package example
  • Rules for creating classes and packages
    • Java classes are deployed in separate files.
    • Each class must be found within a package.
    • The file name of implementing class must match the name of the class.
    • The package structure should match the directory structure. Eg: edu.sun.Ejemplo would be mapped to the file ... / edu / sun / Ejemplo.java
  • Class structure Package person; Import java.util.Vector; public class Person { private Vector partners ; public Person() { this . partners = new Vector(); } public Person(Vector friends) { this . partners = friends; } public void addPartners(Person aPerson){ this . partners .add(aPerson); } }
  • Java packages examples
    • java.io
      • The packet input / output contains the file access classes: FileInputStream and FileOutputStream, and so on.
    • java.lang
      • Includes Java classes themselves: Object, Thread, Exception, System, Integer, Float, Math, String, etc..
    • java.util
      • Miscellaneous useful classes for many things in programming.
      • It includes, Date (date), Dictionary (dictionary), Random (random numbers) and Stack (stack FIFO).
  • java.lang
    • Primitive types are encapsulated in classes:
      • Boolean
      • Byte
      • Character
      • Double
      • Float
      • Integer
      • Long
      • Short
      • Void
  • java.lang (II)
    • Example: Integer (public interface):
      • public final class Integer extends Number
      • Variables:
        • MAX_VALUE (max value for an “int”)
        • MIN_VALUE (min value for an “int”)
      • Builders:
        • Integer(int)
        • Integer(String)
      • Methods:
        • Conversion to other types: doubleValue(), floatValue(), intValue(), parseInt(String), toString(), valueOf(String)
        • Getting a value as an “int”: intValue()
  • java.lang (III)
    • Clases for char characters:
      • clase String: set of characters non editable
      • clase StringBuffer: set of editable characters
    • public final class String extends Object implements Serializable
  • java.lang (IV)
    • Builders:
      • String(byte[])
      • String(char[])
      • String(String)
    • examples:
    char[] chars = {’a’,’b’,’c’}; String s = new String(chars); String s1 = “Hello”; String s2 = new String(s1);
  • java.lang (V)
    • Manipulation string methods:
      • length() , concat(String), indexOf(String), lastIndexOf(String) , toUpperCase(), ...
    • Conversion from other types methods:
      • valueOf(double), valueOf(int), ...
    • Operator “+” in string is overloaded:
      • 3+”abc”+3.4
  • java.lang (VI)
    • Class Math
    • Constants:
      • E, PI
    • Methods:
      • abs(double), acos(double), asin(double), atan, cos, exp, log, max(double, double), pow(double, double), round (float)
  • java.lang (VII)
    • Class System
      • Variables (static):
        • in: &quot;standard” input stream. Usually is the keyboard
        • out: &quot;standard” output stream. Usually, is the message window
        • err: &quot;standard&quot; error output stream. Usually is the message window
    • Methods:
      • getProperties(), gc() - force to use the memory administrator
  • Other packages
    • Package java.util
      • Classes: Vector, Date, HashMap, StringTokenizer…
    • Package java.text
      • Classes: DateFormat, DecimalFormat… (formatting methods).
    • Package java.math
      • Classes: BigDecimal, BigInteger… (precision issues and more).
  • Java Development Kit (JDK)
    • El JDK consists of the following:
      • The Java development tools, including the compiler, debugger and the Java interpeter.
      • The Java class libraries organized as a collection of packages.
      • A significant number of demonstration programs.
      • Various support tools and components, including source code of classes in the library.
    • URL : java.sun.com/javase/downloads
    • The NetBeans IDE is a development environment created based on open source platform from homonymous
    • Develop network-enabled Java Beans components.
    • Jarda Tulach, who designed the IDE's basic architecture, came up with the name NetBeans to describe what they would do
      • Network + Java Beans = NetBeans
    • It is multiplatform
    • CDDL and GPL 2 License.
    • www.netbeans.org
  • Learning resources for Java
    • Sun's Java Tutorials
      • http://java.sun.com/docs/books/tutorial/
    • Sun Academic Iniciative
      • http://sailearningconnection.skillport.com
      • http://osum.sun.com/group/sai
    • Java Passion
      • http://www.javapassion.com/
  • Questions
  • Next Steps
    • Visit Osum project repository for more Java tech demos using NetBeans
    • Join Java groups inside osum and participate in the communities
    • Build your own Java programs
  • Next Steps
    • Get FREE Web-based training on Java TM , Solaris TM & more!
      • Visit: http://www.sunacademic.com
      • Course registration code for ABC University is XYZ
    • Increase earnings potential with a Sun Certification!
      • Sun Certified Associate/Programmer for the Java 2 Platform SE
      • Sun Certified Web Component Developer for Java EE
      • Sun Certified Mobile Application Developer for Java ME
      • Sun Certified System/Network Admin for Solaris Operating System
    • Free practice exams
    • Discounted exams fees for academic developers – only US$40 worldwide
    Fast Track Your Career with Sun!
  • Introduction to Java Tushar Chauhan [email_address] CCET, Wadhwan City.