Download Getting Ready for Java - v1.1 ()

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
Getting Ready for Java
version 1.1
24-May-17
What is Java?


Java is currently a very popular language
Java is a large, powerful language


It has syntax list all the C-family of languages:





but it is not simple!
Variable names are case-sensitive
Semi-colons after individual statements
Curly braces around bunches of statements
Comments start with // (or surrounded by /* and */)
Compared to C++, Java is elegant
getting-ready.ppt
2
Syntax and semantics

Syntax is the “grammar” of the language





The syntax of Java is large, but finite
Syntax must be absolutely correct
The computer will point out every syntax error
Error messages may be helpful or misleading
Semantics is the “meaning” of your program


Semantic errors cause your answers to be wrong
You may or may not get error messages
getting-ready.ppt
3
Two aspects of Java

Java has syntax and semantics




This is where you begin
It is possible to learn everything about Java’s syntax and semantics
We will cover the basics of Java’s syntax and semantics
Java also has “packages”

Packages are sort of like vocabulary bundles
To be good at Java, you need to learn many packages
There are more Java packages than you can ever learn

“packages” may also be called “libraries”


getting-ready.ppt
4
Versions of Java

Java 1 - 1996



Java 2




Java 1.2: Includes “Swing”
Java 1.3: More new packages, no new syntax
Java 1.4: Introduces the assert statement
Java 5 - 2005


Java 1.0: Original, not very good version
Java 1.1: Greatly revised and improved
Java 1.5: Quite a bit of new syntax
Java 6 – Dec. 2005

Runs faster, maybe other features
getting-ready.ppt
5
Vocabulary I

JRE, Java Runtime Environment


JDK, Java Development Kit (previously called SDK,
System Development Kit)



This is the software that allows you to run Java programs on
your computer
The software that allows you to create and run Java programs
on your computer
When you install the SDK, you get a JRE along with it
IDE, Integrated Development Environment

A tool that makes it easier to write programs
getting-ready.ppt
6
Vocabulary II – “Object orientation”

Class


Object


A way to reuse code in a class for a new class, with only small changes
Interface



A data structure in memory, and certain code that can change it
Inheritance


A description of a bunch of data, and the subroutines which can
manipulate that particular data
The place where things touch each other
The way that distinct things communicate
Encapsulation

The time-honored principle of information-hiding
getting-ready.ppt
7
Getting Ready

If you plan to use your own computer:

Download and install Java JDK 1.5




http://java.sun.com/javase/downloads/
Download the JDK, not the JRE
Version 1.6 is also okay
Download and install Eclipse 3.2.1 or newer

http://www.eclipse.org/
getting-ready.ppt
8
The End
getting-ready.ppt
9