Chapter No. : 1 Introduction to Java.

Slides:



Advertisements
Similar presentations
Chapter 1: Computer Systems
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab#1 (14/3/1431h) Introduction To java programming cs425
James Tam Introduction to CPSC 233 CPSC 233: Introduction to Computers II Object-oriented programming The "nuts and bolts" of programming Object-oriented.
IntroductionIntroduction  Computer program: an ordered sequence of statements whose objective is to accomplish a task.  Programming: process of planning.
Outline Java program structure Basic program elements
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Copyright 2013 by Pearson Education Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs reading:
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
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 Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
Java: Chapter 1 Computer Systems Computer Programming II Aug
Introduction to Java Programming with JBuilder 4
Prepared by Uzma Hashmi Instructor Information Uzma Hashmi Office: B# 7/ R# address: Group Addresses Post message:
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
DAT602 Database Application Development Lecture 5 JAVA Review.
Java: Chapter 1 Computer Systems Computer Programming II.
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
1 Part I : Chapter 01 Introduction to Java Programming.
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.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
The Java Programming Language
Centre for Computer Technology ICT214 Object Oriented Design and Programming Week 1 - Introduction Richard Salomon and Umesh Patel Centre for Information.
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-
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Chapter 1: Introduction Java Programming Language How the Java Virtual Machine Works (compiling, etc…) Update by: Dan Fleck Coming up: The Java Programming.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
SOFTWARE TECHNOLOGY - I JAVA/OOP Wickramanayake HMKSK Department of Electrical & Electronic Engineering Faculty of Engineering University.
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.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
Java History Background information about Java and how the background affected it’s development.
Object Oriented Programming Lecture 2: BallWorld.
Introduction to Java Programming, 4E Y. Daniel Liang.
Introduction to Java Programming by Laurie Murphy Revised 09/08/2016.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
James Tam Java History Background information about Java and how it affected it’s development.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
1 Problem Solving  The purpose of writing a program is to solve a problem  The general steps in problem solving are: Understand the problem Dissect the.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Object Oriented Programming in
JAVA MULTIPLE CHOICE QUESTION.
Working with Java.
Chapter 1 Introduction to Computers, Programs, and Java
Lecture 2: Data Types, Variables, Operators, and Expressions
Java History Background information about Java and how the background affected it’s development 1.
Advanced Programming Fall 2017.
Starting JavaProgramming
null, true, and false are also reserved.
Introduction to Java Programming
An Introduction to Java – Part I, language basics
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
Instructor: Alexander Stoytchev
Chapter 1: Computer Systems
Java History Background information about Java and how the background affected it’s development.
Units with – James tedder
Units with – James tedder
Instructor: Alexander Stoytchev
Introduction to Java Brief history of Java Sample Java Program
(Computer fundamental Lab)
Instructor: Alexander Stoytchev
Java Evolution Java History. Java Features.
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:

Chapter No. : 1 Introduction to Java

Topic Learning Outcomes Explain java object oriented programming concepts-WebTechnology, DBMS, DM Explain java platform features Explain primitive data types in Java Write java programs using arrays and strings Analyze and draw class diagrams using UML notations for the given scenario PS : These topics are primitive steps in understanding Object Oriented Programming. School of Computer Science & Engineering

School of Computer Science & Engineering Java History The invention of the microprocessor revolutionized computers Intel microprocessor Commodore Pet microcomputer School of Computer Science & Engineering

School of Computer Science & Engineering Java History It was believed that the logical next step for microprocessors was to have them run intelligent consumer electronics School of Computer Science & Engineering

Java History Sun Microsystems funded an internal research project “Green” to investigate this opportunity. Result: A programming language called “Oak” Blatant advertisement: James Gosling was a graduate of the U of C Computer Science program. Best Known as Father of Java Programming Language © Fox, Image from the website of Sun Microsystems School of Computer Science & Engineering

School of Computer Science & Engineering Java History Problem : There was already a programming language called Oak. The “Green” team met at a local coffee shop to come up with another name... Java! School of Computer Science & Engineering

School of Computer Science & Engineering Java History The concept of intelligent devices didn’t catch on. Project Green and work on the Java language was nearly canceled. School of Computer Science & Engineering

School of Computer Science & Engineering Java History The popularity of the Internet resulted in Sun’s re-focusing of Java on computers. Prior to the advent of Java, web pages allowed you to download only text and images. Your computer at home running a web browser Server containing a web page Images and text get downloaded User clicks on a link School of Computer Science & Engineering

Java is still used in this context today: Java: History Java enabled web browsers allowed for the downloading of programs (Applets). Java is still used in this context today: Your computer at home running a web browser Server containing a web page Java Applet downloaded User clicks on a link School of Computer Science & Engineering

School of Computer Science & Engineering Features Of JAVA Java is simple Java is object-oriented Java is distributed Java is interpreted Java is robust Java is secure Java is architecture-neutral Java is portable Java’s performance Java is multithreaded Java is dynamic School of Computer Science & Engineering

School of Computer Science & Engineering JAVA Development Kit Java 7+ JDK (Java Development Kit), Standard Edition includes: JDK (Java development kit) – for developing Java software (creating Java programs). JRE (Java Runtime environment) – only good for running pre-created Java programs. Java Plug-in – a special version of the JRE designed to run through web browsers. School of Computer Science & Engineering

School of Computer Science & Engineering Java Development Kit javadoc javac Javah Java jdb Text Editor Java Source Code javadoc HTML Files Javac jdb Header Files javah Java class File java Java Program output School of Computer Science & Engineering

Introduction: java programming Configuration of Java program execution environment PATH : Environment variable Java program structure Program = code + data Data types Primitive types: Integer type, floating, char, logical Non-primitive types : array, string, class and interface Code: Programming constructs Key words: 50 Control statements Iterative statements Operators: Logical, relational and arithmetic Coding standards: Pascal and Camel notation Reading input to java programs: command Line, Scanner object Array in java School of Computer Science & Engineering

Introduction: java programming : Key words abstract default implements this assert do import true boolean double instanceof throw break else int throws byte enum interface while case extends long return catch false new short char final null static class finally package const float private continue for super School of Computer Science & Engineering

Introduction: java programming: Data types Integer Type Memory in bytes byte 1 short 2 int 4 long 8 Floating Type float 4 double 8 Textual char 2 (Unicode character) Logical Boolean 1 School of Computer Science & Engineering

Introduction: java programming: Coding standards Set of guidelines Enhance the readability and clarity of the program Make it easy to debug and maintain the program Class name: Should follow Pascal Case i. First letter should be Upper case ii. First letter of each internal word should be capitalized (if it is present) Instance variable, Reference Variable & method name i. First letter should be lower case ii. . First letter of each internal word should be capitalized (if it is present) School of Computer Science & Engineering

Introduction: java programming: program structure [package statement;] [import statements;] [Interface definition] [class definition] class class_name // starter class { public static void main(String[] args) // code } School of Computer Science & Engineering

Introduction: java programming: Example // starter class or test program class HelloWorld { public static void main(String[] args) System.out.println(“Hello world”); } School of Computer Science & Engineering

Introduction: java programming: Reading input from console class CmdArgumentsDemo { public static void main(String[] args) // prints first element System.out.println(args[0]); for(int i=0;i<args.length;i++) System.out.println(args[i]); } //foreach version in java /* for(String s: args) System.out.println(s); }*/ School of Computer Science & Engineering

Introduction: java programming: Assignment Write a java program to read two numbers from user and display sum. Use command line arguments School of Computer Science & Engineering