SlideShare a Scribd company logo
1 of 20
UNDER THE GUIDENCE OF
PRINCE MALHOTRA (Manager)
Java is a high-level programming language originally
developed by Sun Microsystems and released in 1995.
Java runs on a variety of platforms, such as Windows ,
Mac OS, and the various versions of UNIX.
Used in :
#Desktop Applications
#Web application
#robotics
#Games
#Mobile
#SIMPLE
#OBJECT ORIENTED
#PLATFORM INDEPENDENT
#SECURED
#MULTITHREADED
#ROBUST
Designing programs using classes and
objects..Simplify software development and
maintenance by providing concepts:
#object
#class
#inheritance
#polymorphism
#Abstraction
#Encapsulation
Abstraction is a process of hiding internal details
and showing only functionality to the user..
Ways to achieve abstraction:
# Abstract class
# Interface
abstract class Bike { abstract void run(); }
class Honda extends Bike {
void run() { System.out.println(“run safely”); }
public static void main(String args[]) {
Bike obj=new Bike();
obj.run();
}}
It is a mechanism to achieve fully abstraction and
multiple inheritance in java...
interface Printable { void print(); }
interface Showable { void show(); }
class A implements Printable,Showable {
print void print(){ System.out.println(“hello”); }
print void show(){ System.out.println(“Welcome”); }
public static void main(String [] args)
{
A obj= new A();
obj.print() ; obj.show() ; }}
class Bike {
void run() { System.out.println(“running ”); }
class Splender extends Bike {
void run() { System.out.println(“running safely”); }
public Static void main(String []args)
{
Bike obj=new Splender ();
obj.run();
}}
Default Constructor:
class B
{
B(){ System.Out.Println(“Welcome”)}
public Static void main()
{
B obj=new B(); }}
class S
{
Int id; String name; int age;
}
S(int i,String n,int a) { name=n; id=i; age=a; }
S(int i; String n) { name=n; id=i; }
void display(){ System.out.println (id+” ”
+name” ”+age) ; }
public Static void main(String args[]){
S ob1=new S(111, “ keran”);
S obj2=new S(231, “bhanu”, 23);
obj1.display();
obj2.display(); }}
Static property is shared to all objects..
class S {
int rollno; String name;
Static String college=ITS; }
#try
#catch
#finally
#throw
#throws
class A{
public Static void main(String []args) {
int a=integer parse int(args[0]);
int b=integer parse int(args[1]);
int div=0;
try{
div=a/b;
System.out.println(div); }
catch(Arithmetic Exception e){
printStackTrace();
}
System.out.println(“the race is on”);
}}
Training on java niit (sahil gupta 9068557926)

More Related Content

What's hot

Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1Qualys
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaAjay Sharma
 
Java Presentation
Java PresentationJava Presentation
Java Presentationpm2214
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javajayc8586
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming Saravanakumar R
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
Java Presentation For Syntax
Java Presentation For SyntaxJava Presentation For Syntax
Java Presentation For SyntaxPravinYalameli
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operatorkamal kotecha
 

What's hot (20)

Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
Java seminar
Java seminarJava seminar
Java seminar
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java notes
Java notesJava notes
Java notes
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Learn Java Part 1
Learn Java Part 1Learn Java Part 1
Learn Java Part 1
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
 
Core Java
Core JavaCore Java
Core Java
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Bn1005 demo ppt core java
Bn1005 demo ppt core javaBn1005 demo ppt core java
Bn1005 demo ppt core java
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
Java Presentation For Syntax
Java Presentation For SyntaxJava Presentation For Syntax
Java Presentation For Syntax
 
Java Notes
Java Notes Java Notes
Java Notes
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
Java features
Java featuresJava features
Java features
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 

Similar to Training on java niit (sahil gupta 9068557926)

Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayLiz Sims
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01Jay Palit
 
Core Java
Core JavaCore Java
Core JavaNA
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHarry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingJames Wong
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaHoang Nguyen
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_javaTony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingYoung Alista
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingFraboni Ec
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingLuis Goldster
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCraig Dunn
 
java training institute in Dange chowk pune
java training institute in Dange chowk punejava training institute in Dange chowk pune
java training institute in Dange chowk puneCNC WEB WORLD
 
Lecture - 1 introduction to java
Lecture - 1 introduction to javaLecture - 1 introduction to java
Lecture - 1 introduction to javamanish kumar
 

Similar to Training on java niit (sahil gupta 9068557926) (20)

Corejava
Corejava Corejava
Corejava
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01
 
Core Java
Core JavaCore Java
Core Java
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Java session2
Java session2Java session2
Java session2
 
Java presentation
Java presentationJava presentation
Java presentation
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
 
BlueJ Two
BlueJ TwoBlueJ Two
BlueJ Two
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
 
java training institute in Dange chowk pune
java training institute in Dange chowk punejava training institute in Dange chowk pune
java training institute in Dange chowk pune
 
Lecture - 1 introduction to java
Lecture - 1 introduction to javaLecture - 1 introduction to java
Lecture - 1 introduction to java
 

More from Sahil Gupta

Cnc training (sahil gupta 9068557926)
Cnc training (sahil gupta   9068557926)Cnc training (sahil gupta   9068557926)
Cnc training (sahil gupta 9068557926)Sahil Gupta
 
Cnc & java training in bhel (sahil gupta 9068557926)
Cnc & java training in bhel (sahil gupta   9068557926)Cnc & java training in bhel (sahil gupta   9068557926)
Cnc & java training in bhel (sahil gupta 9068557926)Sahil Gupta
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)Sahil Gupta
 
8051 microcontroller training (sahil gupta 9068557926)
8051 microcontroller training  (sahil gupta   9068557926)8051 microcontroller training  (sahil gupta   9068557926)
8051 microcontroller training (sahil gupta 9068557926)Sahil Gupta
 
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training  (2) (sahil gupta   9068557926)8051 microcontroller training  (2) (sahil gupta   9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)Sahil Gupta
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)Sahil Gupta
 
Plc training (sahil gupta 9068557926)
Plc training (sahil gupta   9068557926)Plc training (sahil gupta   9068557926)
Plc training (sahil gupta 9068557926)Sahil Gupta
 

More from Sahil Gupta (7)

Cnc training (sahil gupta 9068557926)
Cnc training (sahil gupta   9068557926)Cnc training (sahil gupta   9068557926)
Cnc training (sahil gupta 9068557926)
 
Cnc & java training in bhel (sahil gupta 9068557926)
Cnc & java training in bhel (sahil gupta   9068557926)Cnc & java training in bhel (sahil gupta   9068557926)
Cnc & java training in bhel (sahil gupta 9068557926)
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)
 
8051 microcontroller training (sahil gupta 9068557926)
8051 microcontroller training  (sahil gupta   9068557926)8051 microcontroller training  (sahil gupta   9068557926)
8051 microcontroller training (sahil gupta 9068557926)
 
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training  (2) (sahil gupta   9068557926)8051 microcontroller training  (2) (sahil gupta   9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
 
Plc training (sahil gupta 9068557926)
Plc training (sahil gupta   9068557926)Plc training (sahil gupta   9068557926)
Plc training (sahil gupta 9068557926)
 

Recently uploaded

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 

Recently uploaded (20)

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 

Training on java niit (sahil gupta 9068557926)

  • 1. UNDER THE GUIDENCE OF PRINCE MALHOTRA (Manager)
  • 2. Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows , Mac OS, and the various versions of UNIX. Used in : #Desktop Applications #Web application #robotics #Games #Mobile
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Designing programs using classes and objects..Simplify software development and maintenance by providing concepts: #object #class #inheritance #polymorphism #Abstraction #Encapsulation
  • 9. Abstraction is a process of hiding internal details and showing only functionality to the user.. Ways to achieve abstraction: # Abstract class # Interface abstract class Bike { abstract void run(); } class Honda extends Bike { void run() { System.out.println(“run safely”); } public static void main(String args[]) { Bike obj=new Bike(); obj.run(); }}
  • 10. It is a mechanism to achieve fully abstraction and multiple inheritance in java... interface Printable { void print(); } interface Showable { void show(); } class A implements Printable,Showable { print void print(){ System.out.println(“hello”); } print void show(){ System.out.println(“Welcome”); } public static void main(String [] args) { A obj= new A(); obj.print() ; obj.show() ; }}
  • 11.
  • 12. class Bike { void run() { System.out.println(“running ”); } class Splender extends Bike { void run() { System.out.println(“running safely”); } public Static void main(String []args) { Bike obj=new Splender (); obj.run(); }}
  • 13. Default Constructor: class B { B(){ System.Out.Println(“Welcome”)} public Static void main() { B obj=new B(); }}
  • 14.
  • 15. class S { Int id; String name; int age; } S(int i,String n,int a) { name=n; id=i; age=a; } S(int i; String n) { name=n; id=i; } void display(){ System.out.println (id+” ” +name” ”+age) ; } public Static void main(String args[]){ S ob1=new S(111, “ keran”); S obj2=new S(231, “bhanu”, 23); obj1.display(); obj2.display(); }}
  • 16. Static property is shared to all objects.. class S { int rollno; String name; Static String college=ITS; }
  • 17.
  • 19. class A{ public Static void main(String []args) { int a=integer parse int(args[0]); int b=integer parse int(args[1]); int div=0; try{ div=a/b; System.out.println(div); } catch(Arithmetic Exception e){ printStackTrace(); } System.out.println(“the race is on”); }}