Clement Allen, PhD Florida A&M University SUMMER 2006.

Slides:



Advertisements
Similar presentations
Object Oriented Programming in Java George Mason University Fall 2011
Advertisements

Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Data Structures Lecture 1 Fang Yu Department of Management Information Systems National Chengchi University Fall 2011.
Excerpts from Introduction to Java Programming, 4E Author: Y. Daniel Liang (Copyright by Prentice Hall)
CHAPTER 1 INTRODUCTION GOALS  To understand the activity of programming  To learn about the architecture of computers  To learn about machine code and.
Introduction to Java Programming, 4E
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
Introduction to Java.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Eclipse is an open source IDE (Integrated Development Environment) for developing applications in Java, C/C++, HTML, Cobol, Perl, etc. The official Eclipse.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Android Club Joe Richard. Welcome Rakhimov Gayrat – JOE Global Solutions (BI, CBU, MedApp) WIUT Sunet Technology (QMS, WM) Ice breaking.
Introduction to Java Programming CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University.
Introduction to Java Programming with JBuilder 4
Introduction to Java Programming CS 21a: Introduction to Computing I First Semester,
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
1 Development Environments AUBG, COS dept Lecture Title: Dev Env: Eclipse (Extract from Syllabus) Reference:
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
1.  At the end of this slide, student can:  Explore tools, features, properties and interface of the Textpad.  Creating a new project.  Open and run.
FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
OOP (Java): Simple/ OOP (Java) Objectives – –give some simple examples of Java applications and one applet 2. Simple Java Programs Semester.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Chapter 1: Introduction to Programs, and Java 1. Objectives To review programs (§ ). To understand the relationship between Java and the World Wide.
POS 406 Java Technology And Beginning Java Code
Introduction to Java Programming with Forte Y. Daniel Liang.
1 Programming Fundamentals AITI-GP. 2 Introduction to Programming.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Programming Fundamentals 2: Simple/ F II Objectives – –give some simple examples of Java applications and one applet 2. Simple Java.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Mini University July, 2005 A Little Taste of Java (but don’t tell your folks) (they might think there’s caffeine involved)
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
Introduction to Programming. The Programming Process Create/Edit Program Compile Program Execute Program Compile Errors?Run-Time Errors? Source Program.
Object Oriented Programming (OOP) LAB # 1 TA. Maram & TA. Mubaraka TA. Kholood & TA. Aamal.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
introductory lecture on java programming
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
ITP 109 Week 2 Trina Gregory Introduction to Java.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
Introduction to Java Programming, 4E Y. Daniel Liang.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
Introduction to.
Internet and Java Foundations, Programming and Practice
Getting Started ARCS Lab..
Java Intro.
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Clement Allen, PhD Florida A&M University SUMMER 2006

(SAMPLE)

Introduction to JAVA History of Java Why all the fuss? Our first Java program Compiling and Executing a Java Program ~ ~ if else ~ ~ system.out

Introduction to JAVA History What is JAVA and why the big deal? “A simple, object-oriented, multi-threaded, portable, platform-independent, secure programming environment for creating applications and smaller programs called applets” SUN engineers embark on a mission to develop a platform independent language that could be used to program consumer appliances

Simple Stripped-down version of C/C++ minus all the confusing, troublesome features of C/C++ Object-oriented Promotes good software engineering. Facilitates reuse. Multithreaded Programs can handle many operations simultaneously

Platform-independent Executable code is bytecode that can run run any machine. Compile once, run everywhere. Secure Applets run in a protected space Portable Works the same on all machines. Write once, run anywhere.

JAVA Fundamentals The two types of Java programs Applets Applications A program that is executed within a Web browser All other programs; a program executed from the command line.

Use your favorite editor to create the source code $ emacs Hello.java / / Program : Hello // Date : 8/27/97 // Date Modified : // Authors : Clement Allen // Description : Our first application public class Hello { // Defines the application called Hello public static void main (String args[ ]) { // Every application has main System.out.println("Hello!"); // This prints the word Hello } // end main } // end Hello

Compile source code $ javac Hello.java Execute the program $ java Hello Hello creates a file called Hello.class Run Program

import javax.swing.*; public class Welcome { // Defines an application called Welcome // begin the execution public static void main(String args[ ] ) { // display a window JOptionPane.showMessageDialog(null,"Welcome to COP3060!!!"); // terminates the application System.exit(0); }

Compile source code $ javac Welcome.java Execute the program $ java Welcome creates a file called Welcome.class Run Program

Eclipse is an open source IDE (Integrated Development Environment) for developing applications in Java, C/C++, HTML, Cobol, Perl, etc. The official Eclipse web site (eclipse.org) says, “Eclipse is a kind of universal tool platform -- an open extensible IDE for anything and nothing in particular.” Java Development with Eclipse

Provides a consistent feature set on most platforms Supports more than just Java or any single language Open source and free, yet fully supported Truly extensible and configurable Industrial strength Eclipse: Java Development with Eclipse

Start Eclipse by Double-clicking on the icon that appears on your desktop. The welcome screen will appear.

From this screen you can get an Overview of Eclipse, Tutorials, and Code Samples.

Each window is called a View. A collection of views is called a Perspective. There is a Java Perspective, Debug Perspective, C++ Perspective, etc.

To switch to a Perspective, go to Window -> Open Perspective…Then choose the Perspective you want. In this case, it is the Java Perspective.

To create a Java program, first create a Project that will contain your source code: File -> New -> Project -> Java Project

Give your project a name, in this case the project is Lab1. Choose Next and then Finish

You will see a folder called Lab1 in the Package Explorer View.

To create a Java program, Choose New -> Other -> Class.

Give your class a name, in the case Hello. Choose Finish.

You will see the the Class in the Package Explorer View, and an Editor View appears where you will enter the code.

Type in the code for Hello.

To save, Right-click on the editor, choose Save.

To save, Right-click on the editor, choose Run As -> Java Application.

The output will appear in the Console View.