1-Introduction and Basics JAVA

36
Welcome

description

 

Transcript of 1-Introduction and Basics JAVA

Page 1: 1-Introduction and Basics JAVA

Welcome

Page 2: 1-Introduction and Basics JAVA

MAKING THE MOSTOF THIS COURSE

Page 3: 1-Introduction and Basics JAVA

no requiredprogramming experience

Page 4: 1-Introduction and Basics JAVA

no requiredplatform

Page 5: 1-Introduction and Basics JAVA

no requiredbackground

Page 6: 1-Introduction and Basics JAVA

WHAT IS PROGRAMMING?

Page 7: 1-Introduction and Basics JAVA

“A computer program is a

set of instructions…”

Page 8: 1-Introduction and Basics JAVA
Page 9: 1-Introduction and Basics JAVA

turn rightdrive one mileturn left on banktake the second rightfourth house on the

left

Page 10: 1-Introduction and Basics JAVA

turn rightdrive one mile

Page 11: 1-Introduction and Basics JAVA
Page 12: 1-Introduction and Basics JAVA

200 + 300 = 500

Page 13: 1-Introduction and Basics JAVA

STATEMENTS

BASIC LET Balance = 500

AppleScript set balance to 500

Java balance = 500;

COBOL MOVE 500 TO BALANCE

Page 14: 1-Introduction and Basics JAVA

WHAT IS A PROGRAMMING LANGUAGE?

Page 15: 1-Introduction and Basics JAVA

• Is the ability to take the idea into your head, break it a part into each individually pieces and now write those pieces into your programing language using at a time . Writing Your statement in a right order with right syntax

Page 16: 1-Introduction and Basics JAVA
Page 17: 1-Introduction and Basics JAVA

CC++

C#Java

JavaScriptPerlPHP

PythonObjective-C

RubyVisual basic

Page 18: 1-Introduction and Basics JAVA

6A10040C5548EC00144C4800000000001400894800488D8900

01E90001E98D6500000000FA8300893D4D89000A1D6C00E5C2

0889480046E4FF126581G42G6B1B005GF2F2D3E88889000B0A

1B1A2B2A3CD3D45FFFDDAAB111BBCCC8C910202FF06A10040C

5548EC00144C4800000000001400894800488D890001E90001

E98D6500000000FA8300893D4D89000A1D6C00E5C208894800

46E4FF126581G42G6B1B005GF2F2D3E88889000B0A1B1A2B2A

3CD3D45FFFDDAAB111BBCCC8C910202FF0F3D5D08900A2A5B2

B500893D4D89000A1D6C00E5C20889480046E4FF5DD089E4B0

A1F33D3BBB50F0D0A1D1D3D45FFFDDAAB111BBCC0A1D6C00E5

C20889480046E4FF5DD089E4B0A1F33D3BBB50F0D0A1D1D3D4

5FFFDDAAB111BBCC

Page 19: 1-Introduction and Basics JAVA

Machine codeCPU

Assembly Language

CLow-Level Languages

C++

Java, C#, VB.NET

Objective-C

Ruby, Python, PHP

JavaScript, ActionScript

High-Level Languages

Page 20: 1-Introduction and Basics JAVA

WRITING SOURCE CODE

Page 21: 1-Introduction and Basics JAVA
Page 22: 1-Introduction and Basics JAVA

print(“Hello, World!”)Python 3 LuaALGOL 68ALGOL 68 / Python 3 /

Page 23: 1-Introduction and Basics JAVA

ALGOL 60

BEGINDISPLAY (“Hello, Wolrd!”);

END.

Page 24: 1-Introduction and Basics JAVA

C

#include <studio.h>

int main(void){

printf(“Hello, world\n”);return 0;

}

Page 25: 1-Introduction and Basics JAVA

C#

using system;

class Example{

static void Main(string[] args){

Console.WriteLine(“Hello world!”);

}}

Page 26: 1-Introduction and Basics JAVA

Java

public class HelloWorld{public static void main(string[] args){

System.out.println(“Hello, World!”);}

}

Page 27: 1-Introduction and Basics JAVA

Where Java is Used

Page 28: 1-Introduction and Basics JAVA

Where Java is Not Used

• JavaScript• Not Native Mobile Apps for Iphone, Windows

Page 29: 1-Introduction and Basics JAVA

Types Of Java Application

• Games• Mobile Apps• Cloud Computing(is the internet-based

storage for files, applications, and infrastructure)

• Databases• Websites

Page 30: 1-Introduction and Basics JAVA

History Of Java

Page 31: 1-Introduction and Basics JAVA

History Of Java

Page 32: 1-Introduction and Basics JAVA

History Of Java

Page 33: 1-Introduction and Basics JAVA

Runtime Architecture

Page 34: 1-Introduction and Basics JAVA

First Java Program-Example

/*This is a simple java program*/

class Example

{

public static void main (String ar[])

{

System.out.println (“This is a simple Java program”);

}

}

Page 35: 1-Introduction and Basics JAVA

class This marks the starting of java code. It is a key word of java.

public This specify the main ( ) is accessible from outside of the class

static This specify that to execute main ( ) even no class objects have been created

void This specify that method does not return value

main JVM is responsible to execute main method

String ar[] String Array data type, species that main takes some arguments when executed (Note that is no argument specified then Sting array takes null as the argument, hence no error occurs).

System This is name of the class that contains the object

out It is static data member of System class

println This is the method which prints the output in the dos command.

Page 36: 1-Introduction and Basics JAVA

Keywords

• The following keywords are reserved in Java, so you must not use them as class names in your programs

abstract case continue extends goto int package short synchronized try

assert catch default final if interface private static this void

boolean char do finally implements long protected strictfp throw volatile

Break class double float import native public super throws while

Byte const else for instanceof new return switch transient