Introduction to.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
IT151: Introduction to Programming
Dale Roberts Introduction to Java - First Program Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Chapter 1 Introduction to JAVA. Why Learn JAVA? Java is one of the fastest growing programming language in the world. Java is one of the fastest growing.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Object Oriented Programming in JAVA
Chapter 1: Introduction
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
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 CS 331. Introduction Present the syntax of Java Introduce the Java API Demonstrate how to build –stand-alone Java programs –Java.
Chapter 2: Java Fundamentals Java Program Structure.
Introduction to Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Getting Started with Java
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
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 CS 21a: Introduction to Computing I First Semester,
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
+ 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.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
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 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.
CS107 Introduction to Computer Science Java Basics.
INTRODUCTION TO JAVA CHAPTER 1 1. WHAT IS JAVA ? Java is a programming language and computing platform first released by Sun Microsystems in The.
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 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
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.
Clement Allen, PhD Florida A&M University SUMMER 2006.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Introduction to programming in the Java programming language.
Chapter 1: Introduction Java Programming Language How the Java Virtual Machine Works (compiling, etc…) Update by: Dan Fleck Coming up: The Java Programming.
CT1513 Introduction To java © A.AlOsaimi.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
A Look at Java. Categorize Java Which paradigm? Which paradigm? Scripting? Scripting? Declarative or procedural? Declarative or procedural? Which generation?
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.
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.
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Chapter 1 Coding Introduction.
Applications Active Web Documents Active Web Documents.
Dept of Computer Science University of Maryland College Park
Working with Java.
Introduction to .NET Framework
Chapter 3 GC 101 Java Fundamentals.
Java programming lecture one
Programming Language Concepts (CIS 635)
Chapter 1 Coding Introduction.
Introduction CSC 111.
Java Intro.
(Computer fundamental Lab)
Tutorial 10: Programming with javascript
Chapter 2: Java Fundamentals
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Computer Programming-1 CSC 111
Presentation transcript:

Introduction to

What is Java ? Java is a programming language and computing platform first released by Sun Microsystems in 1995.  The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. The Java language is accompanied by a library of extra software that we can use when developing programs. The library provides the ability to create graphics, communicate over networks, and interact with databases. The set of supporting libraries is huge.

Java applications and applets Applications – standalone Java programs Applets – Java programs that run inside web browsers Java is the first programming language to deliberately embrace the concept of writing programs that can be executed on the Web.

Compiling Java Programs The Java compiler produces bytecode (a “.class” file) not machine code from the source code (the “.java” file). Bytecode is converted into machine code using a Java Interpreter

Platform Independent Java Programs Compiling You can run bytecode on any computer that has a Java Interpreter installed “Hello.java” “Hello.class”

Fundamentals

Hello world JAVA program // import section public class MyFirstprogram { // main method public static void main( String args[] ){ System.out.println(“Hello World”); } // end main } // end class

Saving, Compiling and Running Java Programs Saving a Java program : A file having a name same as the class name should be used to save the program. The extension of this file is ”.java”. “MyFirstprogram.java”. Compiling a Java program : Call the Java compiler javac The Java compiler generates a file called ” MyFirstprogram.class” (the bytecode). Running a Java program Call the Java Virtual Machine java: java MyFirstprogram.class

Comments in a Java Program Comments are used to describe what your code does its improve the code readability. The Java compiler ignores them. Comments are made using // which comments to the end of the line, /* */, everything inside of it is considered a comment (including multiple lines). Examples: /* This comment begins at this line. This line is included in this comment It ends at this line. */ // This comment starts here and ends at the end of this line.

GOOD Programming practice Be careful java is a sensitive language. It is good to begin every program with a comment that states the purpose of the program and the author. Every java program consist of at least one class that the programmer define. Begin each class name with capital letter. The class name doesn’t begin with a digit and doesn’t contain a space. Use blank lines and spaces to enhance program readability When you type an opining left brace{ immediately type the closing right brace} Indent the entire body of each class declaration