Download 01-Introduction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Advanced Programming in Java
Introduction
Mehdi Einali
1
Agenda
Introduction to Programming
Introduction to Java
Java History
Java Characteristics
2
Think as Computer Scientist
Problem-Solving
the ability to formulate problems, think
creatively about solutions, and express a
solution clearly and accurately
The process of learning to program is an
excellent opportunity to practice
problem-solving skills.
3
Programming languages
High level language
Java, Python, C or C++, and Perl
Low level languages
machine language or assembly language
Loosely-speaking, computers can only run
programs written in low-level languages
Translate from high level to low-level =
compile or interpret
4
advantages
High level languages
It is much easier to program in a highlevel language
less time, shorter and easier to read , most
likely to be correct
Portable
can run on different kinds of computers with
few or no modifications
5
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++.
6
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
7
8
Question?
9
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
Open Source Culture
JCP, JSR
10
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)
A built in library (Java API)
…
Compare it to C++
11
Java Virtual Machine
12
Compile and Execution Stages
Compare to
C++ and
Assembly
.NET
Framework
13
Java is Popular
Some reports on programming languages
popularity
According to
Job advertisements
Book sales
Finding code on the web
…
14
Characteristics of Java
Java
Java
Java
Java
Java
Java
Java
Java
is
is
is
is
is
is
is
is
simple
object-oriented
architecture-neutral
portable
interpreted
multithreaded
secure
robust
15
Oracle, Sun, …
Scott McNealy, former Sun Microsystems CEO, and
Larry Ellison of Oracle announce a closer partnership
in 2006, which led to Oracle acquiring Sun in 2009.
16
First Example
Create a file named First.java
Java class files have .java extension
Note to naming convention
Copy this lines to the file
Note: File name and class name should be the
same.
17
Assignment # 0
Download and install JDK
http://www.oracle.com/technetwork/java/javase/downloads/in
dex.html
JDK 8
Jet brain's really Intelligent IntelliJ IDEA™ Community
Edition
https://www.jetbrains.com/idea/download/
Write a program that prints your name on
the console
Compile and run the program
18
Topics
Introduction to java
language
Advanced Java
Programming
Java syntax, operators,
conditions, loops, …
Strings
Arrays
Exception Handling
Generics
Collections
Threads
Files and Streams
Object Oriented
Programming
Networking
Reflection
Interface
Inheritance
Polymorphism
GUI(not)
Software Quality
An introduction to
programming world
Think like Programmers
Refactoring
Test
19
scoring
Item
Point
Final Exam
5
Midterm Exam
3
Assignments
3
Project
6
Quiz
3
sum
20
20
21