“Hello World” In Java Mehdi Einali Advanced Programming in Java 1.

Slides:



Advertisements
Similar presentations
STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
Advertisements

General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
1 Java Basics. 2 Compiling A “compiler” is a program that translates from one language to another Typically from easy-to-read to fast-to-run e.g. from.
12-Jun-15 JavaScript Language Fundamentals I. 2 About JavaScript JavaScript is not Java, or even related to Java The original name for JavaScript was.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 4: Enhancing Your Program.
1 Chapter 2 Introductory Programs. 2 Getting started To create and run a Java program –Create a text file with a.java extension for the source code. For.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Geography 465 Assignments, Conditionals, and Loops.
Hello, world! Dissect HelloWorld.java Compile it Run it.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
The foreach LooptMyn1 The foreach Loop The foreach loop gives an easy way to iterate over arrays. foreach works only on arrays, and will issue an error.
N ORTH D AKOTA S TATE U NIVERSITY D EPARTMENT OF C OMPUTER S CIENCE © NDSU S OFTWARE T ESTING R ESEARCH G ROUP Integrating Testing into the CS1 Syllabus.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
DAT602 Database Application Development Lecture 5 JAVA Review.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
 JAVA Compilation and Interpretation  JAVA Platform Independence  Building First JAVA Program  Escapes Sequences  Display text with printf  Data.
Peyman Dodangeh Sharif University of Technology Spring 2014.
CompSci 100E 2.1 Java Basics - Expressions  Literals  A literal is a constant value also called a self-defining term  Possibilities: o Object: null,
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
School of Computer Science & Information Technology G6DICP - Lecture 6 Errors, bugs and debugging.
Java Nuts and Bolts Variables and Data Types Operators Expressions Control Flow Statements Arrays and Strings.
Introduction Mehdi Einali Advanced Programming in Java 1.
Reference Learning Java DDC publishing Herst, Yamauchi, Adler COP 3331 Object Oriented Analysis and Design Java Part I.
Agenda Comments Identifiers Keywords Syntax and Symentics Indentation Variables Datatype Operator.
Variables and Constants Chapter 4 Review. Declaring Variables A variable is a name for a value stored in memory. Variables and constants are used in programs.
Mid-Year Review. Coding Problems In general, solve the coding problems by doing it piece by piece. Makes it easier to think about Break parts of code.
100e Hosted by vhs © Don Link, Indian Creek School, 2004 Jeopardy.
“Hello World” In Java Mehdi Einali Advanced Programming in Java 1.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
1 Sections 3.1 – 3.2a Basic Syntax and Semantics Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Java Arrays and ArrayLists COMP T1 #5
Lecture 2 D&D Chapter 2 & Intro to Eclipse IDE Date.
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Java Primer 1: Types, Classes and Operators
CS180 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
C++, OBJECT ORIENTED PROGRAMMING
Primitive Data, Variables, Loops (Maybe)
Data types and variables
Advanced Programming in Java
Cracking the Coding Interview
Advanced Programming Fall 2017.
Units with – James tedder
Units with – James tedder
Building Java Programs
ICT Programming Lesson 4:
Advanced Programming Behnam Hatami Fall 2017.
Advanced Programming in Java
Java Programming Review 1
Chapter 8 Advanced SQL.
Chapter 2 Programming Basics.
(Computer fundamental Lab)
Chap 1. Getting Started Objectives
Problem 1 Given n, calculate 2n
Python Basics. Topics Features How does Python work Basic Features I/O in Python Operators Control Statements Function/Scope of variables OOP Concepts.
Presentation transcript:

“Hello World” In Java Mehdi Einali Advanced Programming in Java 1

2 Agenda Review First program in java Variables Methods Conditions Loops

3 Review Java is Simple object oriented Robust And popular Java is platform independent. Write Once, Run Anywhere!

4 Hello World Create a file named First.java Java class files have.java extension Note to naming convention Copy this lines to the file Note: File name and class name should be the same.

5

6 Debuging Syntax Error Run-time errors exceptions logic or semantic error The semantics, or meaning of the program, are wrong

7 Java Programs A simple java program is a file The file contains one class The class name equal to the file name The names are case sensitive The class contains a main method When we run the program, the main method is executed

8 Variables What is a variable? A piece of memory Holds data For example a number, string or Boolean Java variables have a fixed size Platform independence

9 Java Primitive Types

10 Arithmetic Operators

11 Operator Precedence * 3 = ? is treated as 1 + (2 * 3)

12 Equality and Relational Operators

13 Operators

14 Excersize

15 KHokhan Stubborn Crazy Untidy Stochastic Hate other khokhans And Love Chaos