Tutorial 1. Q1: Compare and contrast between multiprocessors and multicore Multicore – Dual-core processor has two cores (e.g. AMD Phenom II X2, Intel.

Slides:



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

Your First Java Program: HelloWorld.java
Introduction to Java IEEM241 Routing and Fleet Management Feb 3, 2005.
How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
How to Create a Java program CS115 Fall George Koutsogiannakis.
How do we make our HelloTester.java program do something? The java in our HelloTester.java file won’t do anything by itself. We need to tell the computer.
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,
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,
How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
Tutorial 1 Introduction to Java Programming Bo Chen Department of Computer Science.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Lab 1 Instructor: Jolanta Soltis.
Hello, world! Dissect HelloWorld.java Compile it Run it.
Introduction to Java.
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.
CS0007: Introduction to Computer Programming Setting Up Java.
IB Computer Science II Paul Bui
“Introduction to Programming With Java”
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 Tonga Institute of Higher Education.
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.
Java 程序设计 Java Programming Fall, Contents for Today Java Program Structure  How to Compile a Java Program  How to Run a Java Program Environment.
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
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.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
Welcome to the Lecture Series on “Introduction to Programming With Java”
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
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.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
Introduction to Computer Systems and the Java Programming Language.
1 CSC204 – Programming I Lecture 2 Intro to OOP with Java.
POS 406 Java Technology And Beginning Java Code
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Lecture 3 January 14, 2002 CSC Programming I Fall 2001.
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.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
The 1 st and 2 nd tutoring session of CSc2310 Fall, 2012 Haidong Xue.
Mini University July, 2005 A Little Taste of Java (but don’t tell your folks) (they might think there’s caffeine involved)
Pre-Sessional Java Programming Lecture 1a Reyer Zwiggelaar
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
A Look at Java. Categorize Java Which paradigm? Which paradigm? Scripting? Scripting? Declarative or procedural? Declarative or procedural? Which generation?
How to Run Java Applications using the Windows Command Prompt. Julian Falasca May 11 th, 2010 ENGL 393.
CS7 Recitation Cem Akkaya. Outline  Homework-0 in detail  Useful links and tools  Setting up your java environment.
CSI 3125, Preliminaries, page 1 Compiling the Program.
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
การเขียนโปรแกรมภาษา จาวา Java Programming อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 1.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Java Programming by Laurie Murphy Revised 09/08/2016.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
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.
Introduction to programming in java
CompSci 230 S Programming Techniques
The eclipse IDE IDE = “Integrated Development Environment”
Programming without BlueJ Week 12
CompSci 230 Software Construction
Introduction to Java Dept. Business Computing University of Winnipeg
Java Intro III.1 (Fr Feb 23).
Java Intro.
Run Java file with Window cmd
IB Computer Science II Paul Bui
Road to Object Oriented Programming
Presentation transcript:

Tutorial 1

Q1: Compare and contrast between multiprocessors and multicore Multicore – Dual-core processor has two cores (e.g. AMD Phenom II X2, Intel Core Duo), – Quad-core processor contains four cores (e.g. AMD Phenom II X4, intel's quad-core processors, see i3, i5, and i7 at Intel Core), – Hexa-core processor contains six cores (e.g. AMD Phenom II X6, Intel Core i7 Extreme Edition 980X), – Octa-core processor contains eight cores (e.g. Intel Xeon E7-2820). wikipedia

Q2 : List and discuss different compilers for Java programming language. A Java compiler is a compiler for the Java programming language. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode. There exist also compilers emitting optimized native machine code for a particular hardware/operating system combination. As of 2010, the following are major Java compilers: – Javac "java-see", included in JDK from Sun Microsystems, open-sourced since 13 November – GNU Compiler for Java, a part of the GNU Compiler Collection, which compiles C, Fortran, Pascal and other programming languages besides Java. It can also generate native codeusing the back-end of GCC. – ECJ, the Eclipse Compiler for Java, is an open source incremental compiler used by the Eclipse project.

Exercise Go to command prompt: – Open a notepad and write the following code. Save it as HelloWorld.java class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); }

Exercise Run Command Prompt (found under All Programs/Accessories in the Start menu). Type – C:\> cd \mywork This makes C:\mywork the current directory. – C:\mywork> dir This displays the directory contents. – You should see HelloWorld.java among the files. – C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin This tells the system where to find JDK programs. – C:\mywork> javac HelloWorld.javaThis runs javac.exe, the compiler. – You should see nothing but the next system prompt... – C:\mywork> dir javac has created the HelloWorld.class file. – You should see HelloWorld.java andHelloWorld.class among the files –.C:\mywork> java HelloWorld This runs the Java interpreter. – You should see the program output:Hello, World! – If the system cannot find javac, check the set path command. – If javac runs but you get errors, check your Java text. – If the program compiles but you get an exception, check the spelling and capitalization in the file name and the class name and the java HelloWorld command. Java is case-sensitive!