CS-140 Dick Steflik Lecture 3. Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely.

Slides:



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

In Review JAVA C++ GUIs - Windows Webopedia.com.
Object Oriented Programming in Java George Mason University Fall 2011
Object Orientated Programming
Introduction to Java Programming
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
Slide 1 of 40. Lecture A The Java Programming Language Invented 1995 by James Gosling at Sun Microsystems. Based on previous languages: C, C++, Objective-C,
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.
Introduction to the JDK Java for Computational Finance
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Marlene Galea.  The JDK (Java Development Kit)  An IDE (Integrated Development Environment) ◦ Different IDEs include:  JCreator  NetBeans  BlueJ.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
IB Computer Science II Paul Bui
Introduction to Java Tonga Institute of Higher Education.
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
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.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
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.
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
POS 406 Java Technology And Beginning Java Code
Java Programming, Second Edition Chapter One Creating Your First Java Program.
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.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
The Java Platform, The Java Language, JDK, IntelliJ
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
introductory lecture on java programming
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.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
CMSC 202 Computer Science II for Majors Fall 2010 Introduction Version 9/101.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
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.
CS210 Intermediate Computing with Data Structures (Java)
Lecture 1b- Introduction
Intro to ETEC Java.
Before You Begin Nahla Abuel-ola /WIT.
Key Ideas from day 1 slides
Running Programs & IDEs Reference: COS240 Syllabus
Lecture 1: Introduction to JAVA
Internet and Java Foundations, Programming and Practice
Programming without BlueJ Week 12
CompSci 230 Software Construction
Introduction to Java Dept. Business Computing University of Winnipeg
Getting Started ARCS Lab..
Introduction CSC 111.
(Computer fundamental Lab)
How Java Program Executes
IB Computer Science II Paul Bui
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Review of Previous Lesson
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:

CS-140 Dick Steflik Lecture 3

Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely accepted as the internet programming language 18 years old (1995) Compiled optimized for workstation usage derived from C Runs on hardware Poorer object model Widely accepted as workstation program- ming language 34 years old (1979)

The JDK What you get –Compiler (javac.exe) –Run time (JVM) (java.exe) –Javadoc – documentation tool –Jar – tool or making java archives –Keytool – for making public encryption keys –A bunch of mics tools –Java core libraries

The C++ Compiler Translates C++ source code into the machine language for the hardware platform –output of the compiler are object files (.obj) which are partially ready to run –object files must be linked together using the system linker to make an executable file (.exe).exe files are specific for the hardware platform C++ is portable only at the source level

The Java Compiler javac in the /java/bin validates java source code and syntax translates Java source code into java bytecodes –java bytecodes are the machine language for the Java Virtual Machine the JVM is a hypothetical machine that written mostly in Java but a little bit in C and is compiled specifically for various platforms (Windows, Sun, HP, LINUX) Bytecodes are portable between platforms

Java Application Development Java Source File javac Java Class File JVM classpath base classes Compile into bytecodes Run the program

Java import statements imports indicate which parts of which java packages an application will need at run time –also allows the compiler to run to completion and not indicate that the class isn’t part of the file being compiles Remember the compiler only works with the file being compiled

Java application is defined as a class that is instantiated when the program is run main() is the name of the function to be run initially A constructor is used to initialize the class

Java - HelloWorld public class HelloWorld { public static void main(String args[]) { System.out.println(“Hello World”); }

Eclipse A general purpose GUI for software development –Used for Java, C, C++ Eclipse integrates the Java compiler, the Java run-time and an editor together into a what looks like a single tool Anything you can do in Eclipse can be done with the command line tools that come with the JDK and your OS (sometimes easier) We will look at both ways (Eclipse and Command Line)