Top Banner
Advanced Programming in Java Sadegh Aliakbary Sharif University of Technology Fall 2010
23

Advanced Programming in Java

Feb 14, 2016

Download

Documents

kemal

Advanced Programming in Java. Sadegh Aliakbary Sharif University of Technology Fall 2010. Agenda. Introduction to Course Java History Java Characteristics First Example Syllabus Evaluation Policy. This Course Covers:. Java programming language Object Oriented Concepts - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Advanced Programming  in Java

Advanced Programming in Java

Sadegh AliakbarySharif University of Technology

Fall 2010

Page 2: Advanced Programming  in Java

Sharif University of Technology 2

AgendaIntroduction to CourseJava HistoryJava CharacteristicsFirst ExampleSyllabusEvaluation Policy

Fall 2010

Page 3: Advanced Programming  in Java

Sharif University of Technology 3

This Course Covers:Java programming languageObject Oriented ConceptsSome Programming Skills

TestRefactoringCode Smell

Fall 2010

Page 4: Advanced Programming  in Java

Sharif University of Technology 4

Java HistoryJava was created in 1991by James Gosling in Sun Microsystems.Initially called Oak

in honor of the tree outside Gosling's windowIts 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++.Fall 2010

Page 5: Advanced Programming  in Java

Sharif University of Technology 5

Java MotivationThe need for platform independent

languageTo be embedded in various consumer

electronic products like toasters and refrigerators

Platform independent?!HardwareOperating System

Fall 2010

Page 6: Advanced Programming  in Java

Sharif University of Technology 6

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 independenceCreation of AppletsNow, Java is used mostly for server-side

programming

Fall 2010

Page 7: Advanced Programming  in Java

Sharif University of Technology 7

The Java technology is:A programming language

Java can create all kinds of applicationsA development environment

A compiler (javac)An interpreter (java)A documentation generator (javadoc)…

Compare it to C++

Fall 2010

Page 8: Advanced Programming  in Java

Sharif University of Technology 8

High-Level Languages

Fall 2010

Page 9: Advanced Programming  in Java

Sharif University of Technology 9

Java Virtual Machine

Fall 2010

Page 10: Advanced Programming  in Java

Sharif University of Technology 10

Compile and Execution StagesCompare

to C++ and Assembly

.NET Framework

Fall 2010

Page 11: Advanced Programming  in Java

Sharif University of Technology 11

First ExampleCreate a file named First.java

Java class files have .java extensionNote to naming convention

Copy this lines to the fileNote: File name and class name should be the

same.

Fall 2010

Page 12: Advanced Programming  in Java

Sharif University of Technology 12

First Example (2)Run javac First.javaRun java First

We don’t use any IDE now.To highlight compile and run stages.

Lets watch it in real world!

Fall 2010

Page 13: Advanced Programming  in Java

Sharif University of Technology 13

Overview of the Example

Fall 2010

Page 14: Advanced Programming  in Java

Sharif University of Technology 14

Java is PopularSome reports on programming languages

popularityAccording to

Job advertisementsBook salesFinding code on the web…

Fall 2010

Page 15: Advanced Programming  in Java

Sharif University of Technology 15Fall 2010

http://www.langpop.comupdated in 2010

Page 16: Advanced Programming  in Java

Sharif University of Technology 16Fall 2010

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

Page 17: Advanced Programming  in Java

Sharif University of Technology 17

Characteristics of JavaJava is simpleJava is object-orientedJava is architecture-neutralJava is portableJava is interpretedJava is multithreadedJava is secureJava is robust

Fall 2010

Page 18: Advanced Programming  in Java

Sharif University of Technology 18

ConclusionJava is a

Simpleobject orientedRobustAnd popular

Java is platform independent.Write Once, Run Anywhere!

Fall 2010

Page 19: Advanced Programming  in Java

Sharif University of Technology 19

Further ReadingRead Java page on Wikipedia

http://en.wikipedia.org/wiki/Java_(programming_language)Google this terms and phrases:

Fall 2010

JavaJava MobileJVMByte codeJava Sun

Java and C++Java and C#

Page 20: Advanced Programming  in Java

Sharif University of Technology 20

ExercisesDownload and install JDKWrite a program that prints your name on the

consoleCompile and run the program

Fall 2010

Page 21: Advanced Programming  in Java

Sharif University of Technology 21

Evaluation PolicyFinal Exam: 4Midterm Exam 1: 2Midterm Exam 2: 2Quiz & Attendance : 4Assignments: 3Projects: 6+

(Sum=21)

If you don’t want to attend this class…

Fall 2010

Page 22: Advanced Programming  in Java

Sharif University of Technology 22

TopicsIntroduction to java

languageJava syntax, operators,

conditions, loops, …StringsArrays

Object Oriented Programming

InheritancePolymorphismCollectionsGenerics

Exception Handling

Files and I/OThreadsReflectionTestRefactoringGUINetworking

Fall 2010

Page 23: Advanced Programming  in Java

Sharif University of Technology 23Fall 2010