Applied Computing Technology Laboratory QuickStart Java Learning to Program in Java Dr. Tom Way October 21, 2005.

Slides:



Advertisements
Similar presentations
Date: Subject:Distributed Data Processing Name:Maria Br ü ckner.
Advertisements

Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
1 Java Basics. 2 Compiling A “compiler” is a program that translates from one language to another Typically from easy-to-read to fast-to-run e.g. from.
Shlomo Hershkop1 Introduction to java Class 1 Fall 2003 Shlomo Hershkop.
Hello, world! Dissect HelloWorld.java Compile it Run it.
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
A Short Introduction to JAVA
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Java program.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Java: Chapter 1 Computer Systems Computer Programming II.
Introduction to Programming Languages. Problem Solving in Programming.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
C# Versus Java Author: Eaddy, Marc Source: Software Tools for the Professional Programmer. Dr. Dobb's Journal. Feb2001, Vol. 26 Issue 2, p74 Hong Lu CS699A.
Chapter 2: Java Fundamentals
JAVA PROGRAMMING BASICS CHAPTER 2. History of Java Begin with project Green in 1991 founded by Patrick Noughton, Mike Sheridan and James Gosling who worked.
Chapter 1: Introduction Java Programming Language How the Java Virtual Machine Works (compiling, etc…) Update by: Dan Fleck Coming up: The Java Programming.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Intro to Java. Day 1 History Installing Eclipse Sample “Hello” program Packages/Classes/Etc…
We will talking about story of JAVA language. By Kristsada Songpartom.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
1 The JAVA Language Object Oriented Technology Mithani Binjan M.
Developed at Sun Microsystems in 1991 James Gosling, initially named “OAK” Formally announced java in 1995 Object oriented and cant write procedural.
Introduction Mehdi Einali Advanced Programming in Java 1.
CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing.
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
CPSC 233 Tutorial January 21 st /22 nd, Linux Commands.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Object Oriented Programming in
JAVA MULTIPLE CHOICE QUESTION.
GC101 Introduction to computer and program
Chapter No. : 1 Introduction to Java.
Internet and Java Foundations, Programming and Practice
Java programming lecture one
Introduction Enosis Learning.
Introduction Enosis Learning.
Introduction to Programming in Java
Advanced Programming Fall 2017.
Units with – James tedder
Units with – James tedder
Java Programming Review 1
(Computer fundamental Lab)
Presentation transcript:

Applied Computing Technology Laboratory QuickStart Java Learning to Program in Java Dr. Tom Way October 21, 2005

Applied Computing Technology Laboratory 2 The Java Programming Language Developed in 1996 Created by Patrick Naughton, James Gosling and Mike Sheridan (and others) at Sun Microsystems Original called the “Green Project” Uses Object-Oriented paradigm Good for general purpose applications, web apps, databases, etc.

Applied Computing Technology Laboratory 3 Java Advantages Platform independence – “write once, run anywhere” Fast prototyping of user interfaces Excellent documentation Great for teaching and learning Increasing in popularity Now used widely in industry Automatic garbage collection

Applied Computing Technology Laboratory 4 Java Disadvantages Compile to Java byte code, not native Runs on “virtual machine,” so can be slower than native machine Doesn’t have true multiple inheritance (but can get through multiple interfaces) Some simple things are harder – keyboard input, primitive types vs. Objects

Applied Computing Technology Laboratory 5 Java Specification Third edition available on Sun web site Explains: Grammar Lexical structure Types, values, variables Type conversions and promotions Packages, classes, interfaces, inheritance Arrays, exceptions, execution, blocks, statements, expressions, assignments, threads, locks

Applied Computing Technology Laboratory 6 Java Grammar Available on Sun web site Example: Type: Identifier [TypeArguments]{. Identifier [TypeArguments]} {[]} BasicType TypeArguments: TypeArgument: Type ? [( extends | super ) Type] Identifier: IDENTIFIER BasicType: byte | short | char | int | long | float | double | boolean

Applied Computing Technology Laboratory 7 Identifier Identifier: IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral IdentifierChars: JavaLetter IdentifierChars JavaLetterOrDigit JavaLetter: any Unicode character that is a Java letter JavaLetterOrDigit: any Unicode character that is a Java letter-or- digit

Applied Computing Technology Laboratory 8 Step 1: Getting Started Download & install JDK from: Double-click on file to run installer Follow your nose Check online installation instructions for helpful tips

Applied Computing Technology Laboratory 9 Step 2: Eclipse Download & install Eclipse from: Unzip to a directory (e.g., C:\eclipse) Create desktop shortcut, if you like Right-click on eclipse.exe Send to -> Desktop (create shortcut)

Applied Computing Technology Laboratory 10 Step 3: Write a simple program File->New->Project Select “Java Project” Name project “Hello World” Select File->New->Class Name the class “HelloWorld” (no spaces) Check “public static void main()” box Add one line in the main() method: System.out.println(“Hello world!”);

Applied Computing Technology Laboratory 11 Step 4: Run the program Right-click on HelloWorld.java Select Run As->Java Application Watch console at bottom for output Congratulations!

Applied Computing Technology Laboratory 12 Learning more about Java Visit the QuickStart Languages web site View or download the Java API: Read the Java Developers Almanac Google search for: java program examples