Java Overview February 4, 2004. 2/4/2004 Assignments Due – Homework 1 Due – Reading and Warmup questions Project 1 – Basic Networking.

Slides:



Advertisements
Similar presentations
Object Orientated Programming OOP. What is it? What is this?
Advertisements

Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 5: Threads Benefits User and Kernel Threads Multithreading Models Solaris.
1 Chapter 5 Threads 2 Contents  Overview  Benefits  User and Kernel Threads  Multithreading Models  Solaris 2 Threads  Java Threads.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th edition, Jan 23, 2005 Chapter 4: Threads Overview Multithreading.
Albert Johnson Molly Richardson Andrew Kruth.  Threads Runnable interface sleep()  GUIs repaint() paintComponent()
The Java Programming Language  Simple – but abstract  Safe  Platform-independent ("write once, run anywhere")  Has a Rich growing library  Designed.
Java Threads Part II. Lecture Objectives To understand the concepts of multithreading in Java To be able to develop simple multithreaded applications.
Classes and Objects CSC 171 FALL 2004 LECTURE 2. LABS Labs start this week. Go to your 2 nd (Wed or Thurs) lab Expect something like the programming exercises.
CS220 Software Development Lecture: Multi-threading A. O’Riordan, 2009.
Principles of Object-Oriented Software Development The language Java.
HST 952 Computing for Biomedical Scientists Lecture 2.
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,
Threads A thread is a program unit that is executed independently of other parts of the program A thread is a program unit that is executed independently.
Multithreading in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Java Threads CS Introduction to Operating Systems.
1 SD1042: Introduction to Software Development SD1042 Introduction to Software Development SCHOOL OF COMPUTING AND TECHNOLOGY Getting Started MODULE TEAM.
Java Concepts Chapter 2 – Graphical Applications Mr. Smith AP Computer Science A.
Multithreading.
Threading in Java – a Tutorial QMUL IEEE SB. Why Threading When we need to run two tasks concurrently So multiple parts (>=2) of a program can run simultaneously.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Graphical User Interface (GUI) Design using Swing Course Lecture Slides.
Lecture 1 Introduction to Java MIT- AITI 2004 What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word.
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Programming Concept Chapter I Introduction to Java Programming.
1 Programming Fundamentals AITI-GP. 2 Introduction to Programming.
CSC 205 – Java Programming II Applet. Types of Java Programs Applets Applications Console applications Graphics applications Applications are stand-alone.
BUILDING JAVA PROGRAMS CHAPTER 1 ERRORS. 22 OBJECTIVES Recognize different errors that Java uses and how to fix them.
A Guide to Advanced Java Faculty:Nguyen Ngoc Tu. Concurrent programming in Java How to make all things run-able?
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
 GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console.
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 CSCD 330 Network Programming Some Material in these slides from J.F Kurose and K.W. Ross All material copyright Lecture 9 Client-Server Programming.
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.
Concurrent Computing CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS7 Recitation Cem Akkaya. Outline  Homework-0 in detail  Useful links and tools  Setting up your java environment.
© Wang Bin 2004 Java Threads. © Wang Bin 2004 In this lesson, you will learn to: u Define the concepts of threads and multithreading  Identify the functions.
Parallel Processing (CS526) Spring 2012(Week 8).  Shared Memory Architecture  Shared Memory Programming & PLs  Java Threads  Preparing the Environment.
Java Basic Syntax. Object - Objects have states and behaviors. –Example: A dog has states-color, name, breed as well as behaviors -wagging, barking, eating.
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Java - hello world example public class HelloWorld { public static void main (String args[]) { System.out.println("Hello World"); }
CS001 Introduction to Programming Day 6 Sujana Jyothi
Simple Console Output. What we will briefly discuss System.out.println( … ) System.out.print( … ) System.out.printf( … )
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Features of JAVA PLATFORM INDEPENDENT LANGUAGE JAVA RUNTIME ENVIRONMENT (JRE) JAVA VIRTUAL MACHINE (JVM) JAVA APP BYTE CODE JAVA RUNTIME ENVIRONMENT.
Lesson 2: First Java Programs. 2.1 Why Java? Java is one of the most popular programming languages in the world. Java is a modern object-oriented programming.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
John Woodward A Simple Program – Hello world
Multithreading Lec 23.
Intro to Java.
Multithreaded Programming in Java
Getting Started ARCS Lab..
Concurring Concurrently
Interface.
CNT 4007C Project 2 Good morning, everyone. In this class, we will have a brief look at the project 2. Project 2 is basically the same with project 1.
Tonga Institute of Higher Education
Android Topics UI Thread and Limited processing resources
Java Intro.
class PrintOnetoTen { public static void main(String args[]) {
Java Thread.
Constructors, GUI’s(Using Swing) and ActionListner
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Threads in Java James Brucker.
CMSC 202 Threads.
Java Chapter 3 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Java Overview February 4, 2004

2/4/2004 Assignments Due – Homework 1 Due – Reading and Warmup questions Project 1 – Basic Networking

2/4/2004 Hello.java public class Hello { public static void main(String[] args) { //display a greeting in the console window System.out.println(“Hello, World!”); } }

2/4/2004 What is an object? Instance of a class Basic entity manipulated in a Java program Program is made of multiple objects interacting Ex. – coffee machine – Coins, Cups, ??? Behavior – methods called on objects Classes define the behavior

2/4/2004 BankAccount.java

2/4/2004 Threads Lightweight process Would like to be able to do “two things at once” Create a thread to do each thing

2/4/2004 Threads Example // Construct an object to process the HTTP request message. HttpRequest request = new HttpRequest(connectionSocket); // Create a new thread to process the request. Thread thread = new Thread(request); // Start the thread. thread.start(); class HttpRequest implements Runnable // Implement the run() method of the Runnable interface. public void run()

2/4/2004 Graphical User Interface UIExample.java

2/4/2004 Other Helpful Hints