introductory lecture on java programming

Slides:



Advertisements
Similar presentations
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Advertisements

Introduction to Java Kiyeol Ryu Java Programming Language.
Introduction to Java Programming, 4E
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
Introduction to Java.
Session-01. Objective In this session you will learn : The Java Technology Phenomenon What is Java? What is Programming Language? What about Java Platform.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
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.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Java program.
Java program. Java Tutorial Java technology is widely used currently. Let's start learning of java from basic questions like what is java, where it is.
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 with JBuilder 4
+ 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.
Lecturer PEN PHIROM Tel : Web site: Lecturer PEN PHIROM Tel :
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.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
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.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
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.
Java ACO101: Introduction to Computer Science. The History of Java Started out as a research project at Sun Microsystems in 1991 Code named “Green” Based.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
POS 406 Java Technology And Beginning Java Code
Java Introduction 1. Introduction to Java Programming2 Computers and Computer Languages Computers are everywhere –how many computers do you own? Computers.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Introduction to Java Programming with Forte Y. Daniel Liang.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
Introduction To JAVA By Ihtesham Ul Haq. Course Objectives Upon completing the course, you will understand Upon completing the course, you will understand.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
We will talking about story of JAVA language. By Kristsada Songpartom.
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.
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: รัฐภูมิ เถื่อนถนอม
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
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.
CS7 Recitation Cem Akkaya. Outline  Homework-0 in detail  Useful links and tools  Setting up your java environment.
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.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming 1 1 2Introduction to Java.
Introduction to JAVA Programming
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.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
CMSC 202 Computer Science II for Majors Fall 2010 Introduction Version 9/101.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
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.
Object Oriented Programming in
Chapter 1 Introduction to Computers, Programs, and Java
Lecture 1: Introduction to JAVA
Getting Started ARCS Lab..
آشنایی با جاوا Introduction to Java
Chapter 1 Introduction to Computers, Programs, and Java
Introduction CSC 111.
(Computer fundamental Lab)
Java History, Editions, Version Features
Computer Programming-1 CSC 111
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:

introductory lecture on java programming

History of Java In 1991, “Green Team” of Sun Microsystems leaded by James Gosling developed the Java programming language First name was Oak (Oak tree) Java is an island of Indonesia where first coffee was produced (called java coffee) In 1995, JDK Alpha and Beta versions released JDK 1.0 released in january 23, 1996

Why JAVA ? Simple Object-Oriented Platform independent Secured Strong memory management Portable Dynamic High Performance Multithreaded Distributed

Where Java is used? Desktop Applications Web Applications Enterprise Applications Mobile Embedded System Smart Card Robotics Games etc.

Version JDK 8 (18th March, 2014) Most of the cases, we use JDK 7 in our course

Java Technologies Core Java Servlet JSP Java Frameworks Junit Maven

What is Java ? Why Java become famous? Java is a programming language and a platform. Platform indifindent

Java is platform indifindent C/C++ Windows OS

Java is platform indifindent C/C++ C/C++ Linux OS Windows OS

Java is platform indifindent Linux OS Windows OS

Java is platform indifindent JVM for Linux JVM for windows Linux OS Windows OS

Java is platform indifindent Java program java compiler  bytecode(JVM + Java API) run the program Java programs run everwhere because java bytecode run on JRE (JVM+API)

Difference between JDK, JRE and JVM JVM (Java Virtual Machine) is an abstract machine. Provides runtime environment. The JVM performs following main tasks: Loads code Verifies code Executes code Provides runtime environment

Difference between JDK, JRE and JVM JRE (Java Runtime Environment) Provide runtime environment. It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses at runtime.

Difference between JDK, JRE and JVM JDK (Java Development Kit) It contains JRE + development tools.

Internal Architecture of JVM

Java Installation Check Java

How to set path in Java There are 2 ways to set java path: Temporary Permanent 1) How to set Temporary Path of JDK in Windows To set the temporary path of JDK, you need to follow following steps: write in command prompt: set path=copied_path For Example: set path=C:\Program Files\Java\jdk1.6.0_23\bin

How to set path in Java

How to set path in Java How to set Permanent Path of JDK in Windows For setting the permanent path of JDK, you need to follow these steps: Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok

How to set path in Java

Java Program class Hello{ public static void main(String args[]){      System.out.println("Hello World");       }   }   Class  public  static  void  Main  String[] args  System.out.println()

Internal Details of Hello Java Program bytecode class Hello{       public static void main(String args[]){        System.out.println("Hello World");       }   }   Compiler Hello.java Hello.class

Java Program Q)Can you save a java source file by other name than the class name? Ans.) Yes, if the class is not public To compile:javac Hard.java To execute:java Simple

Java Program Q)Can you have multiple classes in a java source file? Ans.)Yes, like the figure given below illustrates:

Source file declaration rules There can be only one public class per source file. A source file can have multiple non public classes. The public class name should be the name of the source file as well which should be appended by .java at the end. For example: the class name is public class Employee{} then the source file should be as Employee.java. If the class is defined inside a package, then the package statement should be the first statement in the source file. If import statements are present then they must be written between the package statement and the class declaration. If there are no package statements then the import statement should be the first line in the source file. Import and package statements will imply to all the classes present in the source file. It is not possible to declare different import and/or package statements to different classes in the source file.

A. forgot the String[] args. It is required. Q. What is the meaning of the words public, static and void? Q. Can a program use more than one command-line argument? A. Yes, you can put several, though we normally use only a few. You refer to the second one as args[1], the third one as args[2], and so forth. Note that we start counting from 0 in Java. Q. What exactly is a .class file? A. It's a binary file (sequence of 0s and 1s). Q. What is the wrong ? public class Hello { public static void main() { System.out.println("Doesn't execute"); } } A. forgot the String[] args. It is required.

Java Programs

Java Programs 1) Write a program Java Progam that prints "Hello, World" ten times. 2) ******************** *************** ********** ***** * 3) 1 2 3 4 5

Java Programs