Sadegh Aliakbary Sharif University of Technology Spring 2011
Agenda Introduction to Course Java History Java Characteristics Syllabus References Evaluation Policy Spring 2011Sharif University of Technology2
This Course Covers: Java programming language Object Oriented Concepts Some Programming Skills Spring 2011Sharif University of Technology3
Java History Java was created in 1991 by James Gosling in Sun Microsystems. Initially called Oak in honor of the tree outside Gosling's window Its name was changed to Java because there was already a language called Oak. Sun Microsystems released the first public implementation as Java 1.0 in 1995 Java syntax is similar to C and C++. Spring 2011Sharif University of Technology4
Java Motivation The need for platform independent language To be embedded in various consumer electronic products like toasters and refrigerators Platform independent?! Hardware Operating System Spring 2011Sharif University of Technology5
Java Motivation (2) At the same time, the World Wide Web and the Internet were gaining popularity. Java could be used for internet programming. Why? Platform independence Creation of Applets Spring 2011Sharif University of Technology6
The Java technology is: A programming language Java can create all kinds of applications A development environment A compiler (javac) An interpreter (java) A documentation generator (javadoc) … Compare it to C++ Spring 2011Sharif University of Technology7
High-Level Languages Spring 2011Sharif University of Technology8
Java Virtual Machine Spring 2011Sharif University of Technology9
Compile and Execution Stages Compare to C++ and Assembly.NET Framework Spring 2011Sharif University of Technology10
Java is Popular Some reports on programming languages popularity According to Job advertisements Book sales Finding code on the web … Spring 2011Sharif University of Technology11
Spring 2011Sharif University of Technology12 updated in 2010
Spring 2011Sharif University of Technology13
Characteristics of Java Java is simple Java is object-oriented Java is architecture-neutral Java is portable Java is interpreted Java is multithreaded Java is secure Java is robust Spring 2011Sharif University of Technology14
Further Reading Read Java page on Wikipedia Google this terms and phrases: Spring 2011Sharif University of Technology15 Java Java Mobile JVM Byte code Java Sun Java and C++ Java and C#
Exercises Download and install JDK Write a program that prints your name on the console Compile and run the program Spring 2011Sharif University of Technology16
Topics Introduction to java language Java syntax, operators, conditions, loops, … Strings Arrays Object Oriented Programming Inheritance Polymorphism Collections Generics Exception Handling Files and I/O Threads Reflection Test Refactoring GUI Networking Spring 2011Sharif University of Technology17
References Thinking in Java Bruce Eckel Fourth Edition Java How to Program Deitel & Deitel 6 th + Edition Spring 2011Sharif University of Technology18
Evaluation Policy Spring 2011Sharif University of Technology19
Quiz! Write a function that takes an array of integers as a parameter and returns the average Use this function in a program Take 10 integers from console Print the average on the console Spring 2011Sharif University of Technology20
Spring 2011Sharif University of Technology21