Lecture 02. Java Virtual Machine(JVM) –set of computer software programs and data structures that use a virtual machine model for the execution of other.

Slides:



Advertisements
Similar presentations
CS0007: Introduction to Computer Programming Console Output, Variables, Literals, and Introduction to Type.
Advertisements

 2005 Pearson Education, Inc. All rights reserved Introduction.
Object Orientated Programming
1 Lecture-4 Chapter 2 C++ Syntax and Semantics, and the Program Development Process Dale/Weems/Headington.
JAVA PROGRAMING LANGUAGE. Content of Java 2 SDK  Development Tools (In the bin subdirectory.) Tools and utilities that will help you develop, execute,
Unit2: Object-oriented programming Getting started with Java Jin Sa.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
Introduction to the JDK Java for Computational Finance
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Marlene Galea.  The JDK (Java Development Kit)  An IDE (Integrated Development Environment) ◦ Different IDEs include:  JCreator  NetBeans  BlueJ.
Introduction to Java Presented by Daniel Rosenthal Friday, November 16 th, 2007.
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Introducing Java.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Java Applications & Program Design
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.
Python Programming Fundamentals
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Java™ How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Android How to Program, 2/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Basic Elements of Java J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
Введение в JAVA. Java Java – язык программирования: объектно-ориентированный кроссплатформенный строго-типизированный.
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
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
CIS 260: App Dev I. 2 Programs and Programming n Program  A sequence of steps designed to accomplish a task n Program design  A detailed _____ for implementing.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
FIRST JAVA PROGRAM. JAVA PROGRAMS Every program may consist of 1 or more classes. Syntax of a class: Each class can contain 1 or more methods. public.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
23-October-2002cse JavaIntro © 2002 University of Washington1 Intro to Java CSE 413, Autumn 2002 Programming Languages
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.
1 Chapter 2 C++ Syntax and Semantics, and the Program Development Process.
Identifiers Identifiers in Java are composed of a series of letters and digits where the first character must be a letter. –Identifiers should help to.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Variables and Assignment CSIS 1595: Fundamentals of Programming and Problem Solving 1.
A Simple Java Program //This program prints Welcome to Java! public class Welcome { public static void main(String[] args) { public static void main(String[]
introductory lecture on java programming
1 What is a Named Constant? A named constant is a location in memory that we can refer to by an identifier, and in which a data value that cannot be changed.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Java Programming: From Problem Analysis to Program Design, Second Edition 1 Lecture 1 Objectives  Become familiar with the basic components of a Java.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Introduction to JAVA Programming
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
CCSA 221 Programming in C CHAPTER 3 COMPILING AND RUNNING YOUR FIRST PROGRAM 1 ALHANOUF ALAMR.
Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of 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.
Object Oriented Programming in
Before You Begin Nahla Abuel-ola /WIT.
Topic: Difference b/w JDK, JRE, JIT, JVM
Java programming lecture one
Programming Vocabulary.
Chapter 6 Methods: A Deeper Look
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Computer Programming-1 CSC 111
M S COLLEGE ART’S, COMM., SCI. & BMS
Review of Java Fundamentals
Presentation transcript:

Lecture 02

Java Virtual Machine(JVM) –set of computer software programs and data structures that use a virtual machine model for the execution of other computer programs and scripts. Java Runtime Environment(JRE) –A runtime environment which implements Java Virtual Machine, and provides all class libraries and other facilities necessary to execute Java programs. This is the software on your computer that actually runs Java programs.

Java Development Kit(JDK) –The basic tools necessary to compile, document, and package Java programs (javac, javadoc, and jar, respectively). The JDK includes a complete JRE. Application Programming Interface (API) – Contains predefined classes and interfaces for developing Java programs.

The Java platform has two components: ◦ The Java Virtual Machine ◦ The Java Application Programming Interface (API)

Java SE(short for Standard Edition) –runs on desktops and laptops Java ME(short for Micro Edition) –runs on mobile devices such as cell phones Java EE(short for Enterprise Edition) –runs on servers

keyword class to declare that a new class is being defined. FirstPro is an identifier that is the name of the class. The main( ) method is simply an entry point for an application. (Ref: Lecture Note 01 – First java Program)

1. Where does a Java program begin execution? 2. What does System.out.println( ) do? 3. What is the name of the Java compiler?

Write a simple Java program which adds 12 and 13, and displays the result on the screen

Statements are used to accomplish simplest tasks in Java forms simplest Java operations. can be single line or Span to multiple lines. does not necessarily return a value.

simplest form of Statements. returns a value when evaluated. can be assigned to a variable or can be tested in Java statements. most expressions are a combination of Operators & Operands

Variables are locations in memory in which values can be stored. Each Variable has a Type, Name and a Value After Declaring, it can be used to store values of the appropriate Type

Reference types (composite) objects Arrays strings are supported by a built-in class named String (java.lang.String)

Use meaningful Names such as number, areaOfCircle, firstName Convention is to start a variable with a lower case If the name is made up of several words, then from the second word onwards the first letter of the word is capital.

Write a simple Java program which divides 12 by 5 and displays the result on the screen. Write a simple Java program multiplies 12.4 and You should display the result on the screen up to two decimal points Write a program which converts inches to centimeters (1m= 39 inches)