The document provides an introduction to Java, describing it as an object-oriented programming language that is platform-independent and has a history dating back to the early '90s. It covers Java syntax, packages, and the structure of Java programs, emphasizing the importance of classes and objects. Additionally, it outlines available learning resources and certifications, encouraging engagement with the Java community.
In this document
Powered by AI
Introduction to Java by Tushar Chauhan, covering the agenda for the presentation including history, syntax, and learning resources.
Java overview as an object-oriented programming language, emphasizing its platform independence and widespread usage.
Development history of Java by James Gosling and team, originally named 'Oak' and later renamed 'Java', inspired by coffee.
Java architecture explained, including .java, .class files, bytecode, and the Java Virtual Machine (JVM) that allows platform independence.
Different Java platforms including Java Card, Java SE, Java EE, Java ME, and Java FX.
Key characteristics of Java language such as object-oriented, distributed, simple, multithreaded, safe, and platform independent.
Introduction to Java syntax including variable initialization, control sentences like if, switch, while, and for loops.
Overview of Java package structure, class rules, and examples of important Java packages such as java.io and java.lang.
Explains the classes like Integer and String in java.lang package, their methods, and Java Math and System classes.
Other useful Java packages like java.util, java.text, and the Java Development Kit (JDK) resources.
Resources for learning Java online, including Sun's Java Tutorials, and next steps to get involved in the Java community.
Presentation concluded by Tushar Chauhan, reconfirming his contact information.
A little bitof history It was conducted by a team of 13 people, led by James Gosling.
25.
Gosling's goals wereto 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.
26.
A little bitof history (II) The language was originally called "Oak". Later renamed "Green" after discovering that Oak was already a trademark.
It is unclearif 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.
29.
The most acceptedhypothesis is that Java is named after a type of coffee available in the coffee store.
.java, .class, JVM???In Java, source code is written in a plain text file with a .Java extension
32.
Then, the codeis compiled into a .Class file. A .Class does not contain native code for a type of processor, instead it contains bytecodes.
33.
Finally, the applicationis interpreted by the Java virtual machine, transforming the bytecode to native code at runtime.
34.
Bytecode The bytecodeis the native language of any implementation of Java Virtual Machine. In this way, a Java program runs on any platform with a JVM.
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)
Java syntax indetail Variable initialization The Java language is strongly typed, which means that all variables must be declared before use. int unaVariable = 1;
49.
String Class Javaprovides special support for the strings via the java.lang.String class
However, by overloadingoperators you can perform operations such as: String unString = “Juan” + “ ” + “Perez” ; Java also provides a wide range of operations to manipulate instances of this class.
52.
Example with arithmeticoperators 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
53.
Example with posfixand 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
54.
Control sentences: if if(expr){ .... } if(expr) sentencia; if(expr){ .... } else { .... }
55.
Control sentences: switch Switch (num){ case num1:...break; case num2:...break; default:...break; }
56.
Control sentences: while and do-while while (expr){ .... } do { .... }while(expr);
57.
Control sentences: for for (exprInic; stopCond; nextStep){ .... } for (int i=0; i<10; i++) { System.out.println(i); } //print numbers from 0 to 9
The file nameof implementing class must match the name of the class.
70.
The package structureshould match the directory structure. Eg: edu.sun.Ejemplo would be mapped to the file ... / edu / sun / Ejemplo.java
71.
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); } }
72.
Java packages examplesjava.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.
73.
It includes, Date(date), Dictionary (dictionary), Random (random numbers) and Stack (stack FIFO).
Jarda Tulach, whodesigned the IDE's basic architecture, came up with the name NetBeans to describe what they would do Network + Java Beans = NetBeans It is multiplatform
Next Steps Get FREE Web-based training on Java TM , Solaris TM & more! Visit: http://www.sunacademic.com
115.
Course registration codefor ABC University is XYZ Increase earnings potential with a Sun Certification! Sun Certified Associate/Programmer for the Java 2 Platform SE
#21 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.
#49Â 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.