SlideShare a Scribd company logo
1 of 48
IDEAL EYES BUSINESS COLLEGE
A
PRESENTATION
1UPLOADED BY:- VIVEK KUMAR
2
DEVELOPER OF JAVA:- JAMES GOSLING
1991 1995 2009
1991 2010 2014 STIL..
HISTORY OF JAVA
 Java Is A Object Oriented Programming Language
Developed By James Gosling In Year 1991.
 Java, May 20, 1995, Sun World.
 Originally Language Name Oak.
 It Said To Be The Name Java Is Come From Several
Individuals Involved In This Project James Gosling ,
Arthur , Van Goff And Andy Bechto Lsheim.
 Name Changed To Java.
HISTORY OF JAVA
 Java is popular and powerful language.
 The java language was derived from c++
 Much of the syntax in java is similar to c and
c++.
 Java does not have pointer features.
 Java supports WORA concept means write once,
run anywhere.
 First Public Release In 1995.
5
HISTORY OF JAVA
 Java is high level language that looks
very similar to c and c++ but offers many
unique features of its own.
6
WHERE JAVA IS USED ?
According to sun, 3 billions devices run on
java. There are many devices where java is
currently used some of them are as :-
Desktops
Web
Mobile
7
Embedded system
Smart card
Robotics
Games
DESKTOP
8
WEB
9
MOBILE PHONES
10
EMBEDDED SYSTEM
11
SMART CARD
12
ROBOTICS
13
GAMES
14
FEATURES OF JAVA
 Java is simple
 Java is object-oriented
 Java is platform independent
 Java is distributed
 Java is interpreted
 Java is robust
15
FEATURES OF JAVA
 Java is secure
 Java is architecture-neutral
 Java is portable
 High performance
 Java is multithreaded
 Java is dynamic
16
WHY JAVA IS SIMPLE ?
1. Syntax is based upon c++.
2. Removed many confusing and lorrarely used
features (explicit pointer,operator overloding).
3. No need to remove unreferenced objects
because there is automatic grabage collection
in java.
17
WHAT IS OBJECT ORIENTED?
Object oriented means we organize our software
as a combination of different types of object that
incorporates both data and behavior.
It is methodology that simplify software
development and maintenance by providing some
rules.
We can do program with the help of object
18
iding
BASIC CONCEPT OF OPPS
Basic concept of OPPS are:-
1.Objects
2.Class
3.Inheritance
4.Abstraction
5.Encapsulation
6.Polymorphism
7.Data hiding
19
WHY JAVA IS PLATFORM
INDEPENDENT?
What is platform?
A platform is the hardware and software environment in which
programs runs.
Java is platform independent because its byte code can be run on
multiple platforms.
Like as:- windows, Linux, Unix, sun Solaris, Mac/OS etc.
That is write onces and run anywhere (WORA).
20
WHY JAVA IS MORE SECURED ?
1. Java is more secure because no explicit pointer use in java.
2. Programs run inside the virtual machine sandbox.
3. Class loader adds security by separating the package for the
classes of the local file system from those that are imported
from network sources.
4. Byte code verifier checks the code fragments for illegal code
that can violate access right to object.
5. Some security can also provided by application
developer through SSL, JAAS, cryptography etc.
21
ROBUST
Robust simply means error tolerance . java uses strong
memory management . There are lack of pointer that
avoids security problems. There is automatic garbage
collection in java . There is exception handling and type
checking mechanism in java. All these pointer makes
java robust .
22
ARCHITECTURAL NATURAL
There is no implementation dependent features its
means it is independent of any hardware
configuration.
23
PORTABLE
We may carry the java byte code to any
platform very easily.
HIGH PERFORMANCE
Java is better and faster than traditional
interpretation since byte code is “close” to
native code still some what slower than a
complied language like c++.
24
DISTRIBUTED
We can create distributed application in java.
RMI and EJB are used for creating
distributed application. We may access files
by calling the methods from any machine on
the internet.
25
MULTITHEADED
A Thread Is Like A Separate Program Executing,
Concurrently. We Can Write java program that deal
with many tasks at once by defining multiple
threads. The main advantage of multithreading is
that it shares the same memory. Threads are
important for multimedia ,web application etc.
26
CREATING “HELLO JAVA”
PROGRAMMING EXAMPLE.
Class simple{
public static void main(String args[])
{
System.out.println(“hello java”);
}
}
27
Save this file as simple.java.
To compile javac simple.java
To execution(run time) java simple
Output hello java.
28
CLASS
The classis the essential Java construct. A class is a
template or blueprint for objects. To program in Java,
you must understand classes and be able to write and
use them. The mystery of the class will continue to be
unveiled throughout this book. For now, though,
understand that a program is defined by using one or
more classes.
29
WHAT IS STATIC?
Static is a keyword, if we declare any method
(function) as static ,it is known as static method.
The core advantage of static method is that there Is
no need to create object to invoke the static method.
The main method is executed by the JVM so it
doesn’t require to create object to invoke the main
method ,so it saves memory.
30
ct to
VOID & STRING ARGS[]
Void is the return type method (function) . It
means it doesn’t return any values.
Main represent startup of the program.
String args[] is used command line argument.
System.out.println()
It is used for print the statement.
31
HOW TO SET PATH OF JDK IN WINDOWS
Path is required for using tools such as javac.java
etc. if you are saving the java file in jdk/bin folder,
path is not required but if you are having your java
file outside the JDK/bin folder. It is necessary to set
path JDK. There are two ways to set path of JDK.
1.Temporary
2.permanently
32
SETTING OF TEMPORARY PATH
For setting the temporary of JDK, you need to follow
these steps:-
1.Open command prompt
2.Copy the path of bin folder
3.Write in command prompt
4. Set path= copied path
c:programfilesjavajdk 1.7.0 25bin;.;
33
JAVA PROGRAM
public class testrrr
{
public static void main (String args[])
{
for(int i=0,j=10;i<10;i++,j++)
{
System.out.println(i+" "+j);
}
}
}
34
35
OUTPUT WOULD BE
1. 36
1. public class classA
2. {
3. public int getValue()
4. {
5. int value=0;
6. boolean setting = false;
7. String title="hello";
8. if(setting && title == "hello")
9. {
10. System.out.println("first if
condition");
11. return 1;
12. }
13. if(value == 1 &&
title.equals("hello"))
14. {
15. System.out.println("second if
condition");
16. return 2;
17. }
18. return 5;
19. }
20. public static void main(String args[])
21. {
22. classA a= new classA();
23. int y=a.getValue();
24. System.out.println("value of y is"+y);
25. }
26. }
37
OUTPUT WOULD BE
38
interface DeclareStuff
{
public static final int EASY =3;
void doStuff(int t);
}
public class TestDeclare implements DeclareStuff
{
public static void main(String args[])
{
int x = 5;
new TestDeclare().doStuff(++x);
}
public void doStuff(int s)
{
s += EASY - ++s;
System.out.println("s"+--s);
}
}
39
OUTPUT WOULD BE
40
class c
{
public static void main (String args[])
{
int x=9;
if(x == 9)
{
int x=8;
System.out.println(x);
}
41
OUTPUT WOULD BE
42
class A
{
A(){System.out.println("A class constructor");}
{System.out.println("annonymous block in class
A");}
void display(){System.out.println("display in class
A");}
}
class B extends A
{
B(){System.out.println("B class constructor");}
{System.out.println("annonymous block in class
B");}
void display(){System.out.println("display in class
B");}
}
class C extends B
{
C(){System.out.println("C class constructor");}
class D extends C
{
D(){System.out.println("D class constructor");}
{System.out.println("annonymous block in class
D");}
void display(){System.out.println("display in class
D");}
public static void main(String args[])
{
C c1=new C();
c1.display();
}
}
43
OUTPUT WOULD BE
44
class jump_statments
{
public static void main(String args[])
{
int x=2;
int y=0;
for(;y<10;++y)
{
if(y%x==0)
continue;
else if(y==8)
break;
else
45
OUTPUT WOULD BE
46
class output_test
{
public static void
main(String args[])
{
int x,y=1;
x=10;
if (x!=10 && x/0 ==0)
System.out.println(y);
else
System.out.println(++y);
47
OUTPUT WOULD BE
DON’T TRY TO LEARN
JAVA JUST TRY TO LIVE
IT..
THANK YOU
48

More Related Content

What's hot

Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
Ravi_Kant_Sahu
 

What's hot (20)

Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Simple Java Programs
Simple Java ProgramsSimple Java Programs
Simple Java Programs
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Java
JavaJava
Java
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
 
OOP java
OOP javaOOP java
OOP java
 
Java swing
Java swingJava swing
Java swing
 
Features of java
Features of javaFeatures of java
Features of java
 
JAVA PPT Part-1 BY ADI.pdf
JAVA PPT Part-1 BY ADI.pdfJAVA PPT Part-1 BY ADI.pdf
JAVA PPT Part-1 BY ADI.pdf
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Core java
Core javaCore java
Core java
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
 

Viewers also liked

Viewers also liked (20)

Building Web Hack Interfaces
Building Web Hack InterfacesBuilding Web Hack Interfaces
Building Web Hack Interfaces
 
Mkgirlsnightin2015 2
Mkgirlsnightin2015 2Mkgirlsnightin2015 2
Mkgirlsnightin2015 2
 
(Open Hack Night Fall 2014) Hacking Tutorial
(Open Hack Night Fall 2014) Hacking Tutorial(Open Hack Night Fall 2014) Hacking Tutorial
(Open Hack Night Fall 2014) Hacking Tutorial
 
Cara mendeface sebuah website
Cara mendeface sebuah websiteCara mendeface sebuah website
Cara mendeface sebuah website
 
Leadpreneur and discussion Global Top Leader Challenge
Leadpreneur and discussion Global Top Leader ChallengeLeadpreneur and discussion Global Top Leader Challenge
Leadpreneur and discussion Global Top Leader Challenge
 
Web hack & attacks
Web hack & attacksWeb hack & attacks
Web hack & attacks
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
Risk assesment
Risk assesmentRisk assesment
Risk assesment
 
Panduan Instalasi Android Studio
Panduan Instalasi Android StudioPanduan Instalasi Android Studio
Panduan Instalasi Android Studio
 
“Can we deface your Web in 10 mins?” - Edu 3.4
“Can we deface your Web in 10 mins?” - Edu 3.4“Can we deface your Web in 10 mins?” - Edu 3.4
“Can we deface your Web in 10 mins?” - Edu 3.4
 
E-Gov Project Management Essentials
E-Gov Project Management EssentialsE-Gov Project Management Essentials
E-Gov Project Management Essentials
 
Let's Hack School: Learner Agency in a Time of New Technologies
Let's Hack School: Learner Agency in a Time of New TechnologiesLet's Hack School: Learner Agency in a Time of New Technologies
Let's Hack School: Learner Agency in a Time of New Technologies
 
what is security
what is securitywhat is security
what is security
 
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card View
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card ViewBelajar Android Studio Material Design Penggunaan RecyclerView dan Card View
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card View
 
Vulnerability Assesment
Vulnerability AssesmentVulnerability Assesment
Vulnerability Assesment
 
Teaching Materials & Student Progress Assesment
Teaching Materials & Student Progress AssesmentTeaching Materials & Student Progress Assesment
Teaching Materials & Student Progress Assesment
 
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation DrawerAndroid Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
 
Clinical Risk Assesment - Dr Harshavardhan Patwal
Clinical Risk Assesment - Dr Harshavardhan PatwalClinical Risk Assesment - Dr Harshavardhan Patwal
Clinical Risk Assesment - Dr Harshavardhan Patwal
 
Belajar Android Studio Memberi Efek animasi pada Button
Belajar Android Studio Memberi Efek animasi pada ButtonBelajar Android Studio Memberi Efek animasi pada Button
Belajar Android Studio Memberi Efek animasi pada Button
 
Kenalan Dengan Firebase Android
Kenalan Dengan Firebase AndroidKenalan Dengan Firebase Android
Kenalan Dengan Firebase Android
 

Similar to Java basic introduction

JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 

Similar to Java basic introduction (20)

CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Java Introduction | PDF
Java Introduction |  PDFJava Introduction |  PDF
Java Introduction | PDF
 
java basic for begginers
java basic for begginersjava basic for begginers
java basic for begginers
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
 
Java session2
Java session2Java session2
Java session2
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Core java
Core javaCore java
Core java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
Java
JavaJava
Java
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
 
Presentation5
Presentation5Presentation5
Presentation5
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
Java
JavaJava
Java
 
0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Java basic introduction

  • 1. IDEAL EYES BUSINESS COLLEGE A PRESENTATION 1UPLOADED BY:- VIVEK KUMAR
  • 2. 2 DEVELOPER OF JAVA:- JAMES GOSLING
  • 3. 1991 1995 2009 1991 2010 2014 STIL..
  • 4. HISTORY OF JAVA  Java Is A Object Oriented Programming Language Developed By James Gosling In Year 1991.  Java, May 20, 1995, Sun World.  Originally Language Name Oak.  It Said To Be The Name Java Is Come From Several Individuals Involved In This Project James Gosling , Arthur , Van Goff And Andy Bechto Lsheim.  Name Changed To Java.
  • 5. HISTORY OF JAVA  Java is popular and powerful language.  The java language was derived from c++  Much of the syntax in java is similar to c and c++.  Java does not have pointer features.  Java supports WORA concept means write once, run anywhere.  First Public Release In 1995. 5
  • 6. HISTORY OF JAVA  Java is high level language that looks very similar to c and c++ but offers many unique features of its own. 6
  • 7. WHERE JAVA IS USED ? According to sun, 3 billions devices run on java. There are many devices where java is currently used some of them are as :- Desktops Web Mobile 7 Embedded system Smart card Robotics Games
  • 15. FEATURES OF JAVA  Java is simple  Java is object-oriented  Java is platform independent  Java is distributed  Java is interpreted  Java is robust 15
  • 16. FEATURES OF JAVA  Java is secure  Java is architecture-neutral  Java is portable  High performance  Java is multithreaded  Java is dynamic 16
  • 17. WHY JAVA IS SIMPLE ? 1. Syntax is based upon c++. 2. Removed many confusing and lorrarely used features (explicit pointer,operator overloding). 3. No need to remove unreferenced objects because there is automatic grabage collection in java. 17
  • 18. WHAT IS OBJECT ORIENTED? Object oriented means we organize our software as a combination of different types of object that incorporates both data and behavior. It is methodology that simplify software development and maintenance by providing some rules. We can do program with the help of object 18 iding
  • 19. BASIC CONCEPT OF OPPS Basic concept of OPPS are:- 1.Objects 2.Class 3.Inheritance 4.Abstraction 5.Encapsulation 6.Polymorphism 7.Data hiding 19
  • 20. WHY JAVA IS PLATFORM INDEPENDENT? What is platform? A platform is the hardware and software environment in which programs runs. Java is platform independent because its byte code can be run on multiple platforms. Like as:- windows, Linux, Unix, sun Solaris, Mac/OS etc. That is write onces and run anywhere (WORA). 20
  • 21. WHY JAVA IS MORE SECURED ? 1. Java is more secure because no explicit pointer use in java. 2. Programs run inside the virtual machine sandbox. 3. Class loader adds security by separating the package for the classes of the local file system from those that are imported from network sources. 4. Byte code verifier checks the code fragments for illegal code that can violate access right to object. 5. Some security can also provided by application developer through SSL, JAAS, cryptography etc. 21
  • 22. ROBUST Robust simply means error tolerance . java uses strong memory management . There are lack of pointer that avoids security problems. There is automatic garbage collection in java . There is exception handling and type checking mechanism in java. All these pointer makes java robust . 22
  • 23. ARCHITECTURAL NATURAL There is no implementation dependent features its means it is independent of any hardware configuration. 23 PORTABLE We may carry the java byte code to any platform very easily.
  • 24. HIGH PERFORMANCE Java is better and faster than traditional interpretation since byte code is “close” to native code still some what slower than a complied language like c++. 24
  • 25. DISTRIBUTED We can create distributed application in java. RMI and EJB are used for creating distributed application. We may access files by calling the methods from any machine on the internet. 25
  • 26. MULTITHEADED A Thread Is Like A Separate Program Executing, Concurrently. We Can Write java program that deal with many tasks at once by defining multiple threads. The main advantage of multithreading is that it shares the same memory. Threads are important for multimedia ,web application etc. 26
  • 27. CREATING “HELLO JAVA” PROGRAMMING EXAMPLE. Class simple{ public static void main(String args[]) { System.out.println(“hello java”); } } 27
  • 28. Save this file as simple.java. To compile javac simple.java To execution(run time) java simple Output hello java. 28
  • 29. CLASS The classis the essential Java construct. A class is a template or blueprint for objects. To program in Java, you must understand classes and be able to write and use them. The mystery of the class will continue to be unveiled throughout this book. For now, though, understand that a program is defined by using one or more classes. 29
  • 30. WHAT IS STATIC? Static is a keyword, if we declare any method (function) as static ,it is known as static method. The core advantage of static method is that there Is no need to create object to invoke the static method. The main method is executed by the JVM so it doesn’t require to create object to invoke the main method ,so it saves memory. 30 ct to
  • 31. VOID & STRING ARGS[] Void is the return type method (function) . It means it doesn’t return any values. Main represent startup of the program. String args[] is used command line argument. System.out.println() It is used for print the statement. 31
  • 32. HOW TO SET PATH OF JDK IN WINDOWS Path is required for using tools such as javac.java etc. if you are saving the java file in jdk/bin folder, path is not required but if you are having your java file outside the JDK/bin folder. It is necessary to set path JDK. There are two ways to set path of JDK. 1.Temporary 2.permanently 32
  • 33. SETTING OF TEMPORARY PATH For setting the temporary of JDK, you need to follow these steps:- 1.Open command prompt 2.Copy the path of bin folder 3.Write in command prompt 4. Set path= copied path c:programfilesjavajdk 1.7.0 25bin;.; 33
  • 34. JAVA PROGRAM public class testrrr { public static void main (String args[]) { for(int i=0,j=10;i<10;i++,j++) { System.out.println(i+" "+j); } } } 34
  • 36. 1. 36 1. public class classA 2. { 3. public int getValue() 4. { 5. int value=0; 6. boolean setting = false; 7. String title="hello"; 8. if(setting && title == "hello") 9. { 10. System.out.println("first if condition"); 11. return 1; 12. } 13. if(value == 1 && title.equals("hello")) 14. { 15. System.out.println("second if condition"); 16. return 2; 17. } 18. return 5; 19. } 20. public static void main(String args[]) 21. { 22. classA a= new classA(); 23. int y=a.getValue(); 24. System.out.println("value of y is"+y); 25. } 26. }
  • 38. 38 interface DeclareStuff { public static final int EASY =3; void doStuff(int t); } public class TestDeclare implements DeclareStuff { public static void main(String args[]) { int x = 5; new TestDeclare().doStuff(++x); } public void doStuff(int s) { s += EASY - ++s; System.out.println("s"+--s); } }
  • 40. 40 class c { public static void main (String args[]) { int x=9; if(x == 9) { int x=8; System.out.println(x); }
  • 42. 42 class A { A(){System.out.println("A class constructor");} {System.out.println("annonymous block in class A");} void display(){System.out.println("display in class A");} } class B extends A { B(){System.out.println("B class constructor");} {System.out.println("annonymous block in class B");} void display(){System.out.println("display in class B");} } class C extends B { C(){System.out.println("C class constructor");} class D extends C { D(){System.out.println("D class constructor");} {System.out.println("annonymous block in class D");} void display(){System.out.println("display in class D");} public static void main(String args[]) { C c1=new C(); c1.display(); } }
  • 44. 44 class jump_statments { public static void main(String args[]) { int x=2; int y=0; for(;y<10;++y) { if(y%x==0) continue; else if(y==8) break; else
  • 46. 46 class output_test { public static void main(String args[]) { int x,y=1; x=10; if (x!=10 && x/0 ==0) System.out.println(y); else System.out.println(++y);
  • 48. DON’T TRY TO LEARN JAVA JUST TRY TO LIVE IT.. THANK YOU 48

Editor's Notes

  1. First Class: Introduction, Prerequisites, Advices, Syllabus Lab 1: Create a Java Project, Compile, and Run. Show syntax errors Print program Capture screen shots, and save it in Word, and print it. Homework One: Check in the class randomly.