Welcome to the Lecture Series on “Introduction to Programming With Java”

Slides:



Advertisements
Similar presentations
Introduction to programming in java. Input and output to screen with Java program Structure of Java programs Statements Conditional statements.
Advertisements

Begin Java Pepper. Objectives What is a program? Learn the basics of your programming tool: BlueJ Write a first Java program and see it run Make some.
Welcome to Java Programming. Why do I want to take this course? I want to major in EE/CSE. ECE122 is a requirement. Java is hot in Job market. It is useful.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Chapter 2: Your First Program! Hello World: Let’s Program  All programs must have the extension.java  Our first program will be named: HelloWorld.java.
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.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
CHAPTER 1 INTRODUCTION GOALS  To understand the activity of programming  To learn about the architecture of computers  To learn about machine code and.
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,
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
 2003 Prentice Hall, Inc. All rights reserved. Customized by Sana Odeh for the use of this class. 1 Introduction to Computers and Programming in JAVA.
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,
Copyright 2006 by Pearson Education 1 Building Java Programs Chapter 1: Introduction to Java Programming.
Copyright 2013 by Pearson Education Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs reading:
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
“Introduction to Programming With Java”
Laboratory Study October, The very first example, traditional "Hello World!" program: public class first { public static void main (String[ ]
COMP 110: Introduction to Programming Tyler Johnson January 14, 2009 MWF 11:00AM-12:15PM Sitterson 014.
Introduction to Computational Linguistics Programming I.
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Programming Concept Chapter I Introduction to Java Programming.
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
“Introduction to Programming With Java”
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
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.
Output in Java Hello World!. Structure of a Java Program  All Java files in ICS3U1 have the following structure: class HelloWorld { }  Notice the open.
8/31: Intro to Java, Languages, and Environments Types of programming languages –machine languages –assembly languages –high-level languages Java environment.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Creating Your First Computer Program in Java Margaret Yau.
Pre-Sessional Java Programming Lecture 1a Reyer Zwiggelaar
© 2004 Pearson Addison-Wesley. All rights reserved ComS 207: Programming I Instructor: Alexander Stoytchev
JAVA Practical Creating our first program 2. Source code file 3. Class file 4. Understanding the different parts of our program 5. Escape characters.
Hello Computer Science!. Below is an example of a Hello World program in JAVA. While it is only three lines of code, there are many things that are happening.
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.
Lab 01-2 Objectives:  Writing a Java program.  How to send output to the command line console.  Learn about escape sequences.  Learn how to compile,
CSI 3125, Preliminaries, page 1 Compiling the Program.
A Simple Java Program //This program prints Welcome to Java! public class Welcome { public static void main(String[] args) { public static void main(String[]
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
Agenda Comments Identifiers Keywords Syntax and Symentics Indentation Variables Datatype Operator.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
CS 106 Introduction to Computer Science I 01 / 24 / 2007 Instructor: Michael Eckmann.
Chapter 3 Introducing Java. Objectives and Goals 1. Define terminology associated with object- oriented programming. 2. Explain why Java is a widely used.
Introduction to Programming (CS 201) Lecture 01 - Introduction.
Welcome to CSE 142! Zorah Fung University of Washington, Summer Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs.
Copyright 2010 by Pearson Education APCS Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs reading:
Introduction to java (class and object). Programming languages: –Easier to understand than CPU instructions –Needs to be translated for the CPU to understand.
Introduction to programming in java
Programming what is C++
John Woodward A Simple Program – Hello world
GC101 Introduction to computer and program
Chapter 3 GC 101 Java Fundamentals.
Introduction to Programming (CS 201)
CSE 190D, Winter 2013 Building Java Programs Chapter 1
Lecture Note Set 1 Thursday 12-May-05
Intro to Java.
Writing Methods.
An Introduction to Java – Part I, language basics
Java Tutotrial for [NLP-AI] 2
Java Intro.
CS110D Programming Language I
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.
CSE 142, Spring 2012 Building Java Programs Chapter 1
CSE 142, Winter 2014 Building Java Programs Chapter 1
Zorah Fung University of Washington, Winter 2016
How to Run a Java Program
Presentation transcript:

Welcome to the Lecture Series on “Introduction to Programming With Java”

Structure of Java programs Input and output to screen with Java program Statements Conditional statements Loop constructs Arrays, character and string handling Functions (if time permits) Syllabus

1.Java 2: The Complete Reference – Patrick Naughton, Herbert Schildt 2.Thinking in Java ( – Bruce Eckel 3. Richard G Baldwin’s “Introductory Java Programming Tutorial” on: Books & References

Structure of Java programs Compiling and running the program Printing messages to the screen Contents for Today’s Lecture

Some Basics Q. What is a program? Ans. A sequence of instructions that a computer can interpret and execute. Q. Why Java and not Hindi / Marathi / English? Ans. Since, so far, computer is not intelligent enough to understand natural languages.

class class-name { public static void main(String args[]) { statement1; statement2; … } Structure of Java Programs

“First.java” class First { public static void main(String args[]) { System.out.println(“Hello World”); } Example Program

Compiling: is the process of translating source code written in a particular programming language into computer-readable machine code that can be executed. $ javac First.java This command will produce a file ‘First.class’, which is used for running the program with the command ‘java’. Running: is the process of executing program on a computer. $ java First Compiling & Running the Program

1.System.out.println(“Hello World”); – outputs the string “Hello World” followed by a new line on the screen. 2.System.out.print(“Hello World”); - outputs the string “Hello World” on the screen. This string is not followed by a new line. 3.Some Escape Sequence – \n – stands for new line character \t – stands for tab character About Printing on the Screen

Some common errors in the initial phase of learning programming: - Mismatch of parentheses - Missing ‘;’ at the end of statement - Case sensitivity The best way to learn programming is writing a lot of programs on your own. Some Tips About Programming

1.Write a program which prints the following information about at least 5 persons: NAME MAIL-ID EMPLOYEE-CODE PHONE Eg. Umesh p03161 Salil p03160 Each entry should be on a separate line. 2.Write a program that prints the following line on the screen along with quotes. “Can we print ‘\’ with System.out.println() statement?” Some Assignments

Thank you… End