SlideShare a Scribd company logo
Welcome to the Lecture
Series on
nlp-ai@cse.iitb
“Introduction to Programming
With Java”
nlp-ai@cse.iitb
• 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
nlp-ai@cse.iitb
1. Java 2: The Complete Reference
– Patrick Naughton, Herbert Schildt
2. Thinking in Java (http://www.mindview.net/Books/TIJ/)
– Bruce Eckel
3. Richard G Baldwin’s “Introductory Java Programming
Tutorial” on: http://www.dickbaldwin.com/tocint.htm
Books & References
nlp-ai@cse.iitb
• Structure of Java programs
• Compiling and running the program
• Printing messages to the screen
Contents for Today’s Lecture
nlp-ai@cse.iitb
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.
nlp-ai@cse.iitb
class class-name {
public static void main(String args[]) {
statement1;
statement2;
…
…
}
}
Structure of Java Programs
nlp-ai@cse.iitb
“First.java”
class First {
public static void main(String args[]) {
System.out.println(“Hello World”);
}
}
Example Program
nlp-ai@cse.iitb
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
nlp-ai@cse.iitb
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
nlp-ai@cse.iitb
• 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
nlp-ai@cse.iitb
1. Write a program which prints the following information
about at least 5 persons:
NAME MAIL-ID EMPLOYEE-CODE PHONE
Eg. Umesh umesh@cse p03161 25764728
Salil salil@cse p03160 25764728
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 
nlp-ai@cse.iitb
Thank you…
End

More Related Content

Similar to core java oracle java fundamental java slide

Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
Salahaddin University-Erbil
 
java 1 new.pdf
java 1 new.pdfjava 1 new.pdf
java 1 new.pdf
SulSya
 
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
GauravGamer2
 
Structure of a C# Program
Structure of a C# ProgramStructure of a C# Program
Structure of a C# Program
Ali Hassan
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone Development
ThoughtWorks
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Skillspire LLC
 
01Introsystem programming to study computer .pdf
01Introsystem programming to study computer .pdf01Introsystem programming to study computer .pdf
01Introsystem programming to study computer .pdf
mojbar
 
Letter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of ProgrammingLetter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of Programming
Lazar Kovacevic
 
Java1 in mumbai
Java1 in mumbaiJava1 in mumbai
Java1 in mumbai
vibrantuser
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdf
lailoesakhan
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
SM Rasel
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
C4Media
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scala
João Cavalheiro
 
Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1
introtojava
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
AOmaAli
 
PROGRAMMING Introduction & Assessment Help
PROGRAMMING Introduction & Assessment HelpPROGRAMMING Introduction & Assessment Help
PROGRAMMING Introduction & Assessment Help
Assignment Help Services
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and tools
Rui Carvalho
 
01.intro
01.intro01.intro
01.intro
Philip Johnson
 
Intro javascript build a scraper (3:22)
Intro javascript   build a scraper (3:22)Intro javascript   build a scraper (3:22)
Intro javascript build a scraper (3:22)
Thinkful
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
litbbsr
 

Similar to core java oracle java fundamental java slide (20)

Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
java 1 new.pdf
java 1 new.pdfjava 1 new.pdf
java 1 new.pdf
 
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
 
Structure of a C# Program
Structure of a C# ProgramStructure of a C# Program
Structure of a C# Program
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone Development
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
01Introsystem programming to study computer .pdf
01Introsystem programming to study computer .pdf01Introsystem programming to study computer .pdf
01Introsystem programming to study computer .pdf
 
Letter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of ProgrammingLetter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of Programming
 
Java1 in mumbai
Java1 in mumbaiJava1 in mumbai
Java1 in mumbai
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdf
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scala
 
Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
 
PROGRAMMING Introduction & Assessment Help
PROGRAMMING Introduction & Assessment HelpPROGRAMMING Introduction & Assessment Help
PROGRAMMING Introduction & Assessment Help
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and tools
 
01.intro
01.intro01.intro
01.intro
 
Intro javascript build a scraper (3:22)
Intro javascript   build a scraper (3:22)Intro javascript   build a scraper (3:22)
Intro javascript build a scraper (3:22)
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
 

Recently uploaded

ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 

Recently uploaded (20)

ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 

core java oracle java fundamental java slide

  • 1. Welcome to the Lecture Series on nlp-ai@cse.iitb “Introduction to Programming With Java”
  • 2. nlp-ai@cse.iitb • 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
  • 3. nlp-ai@cse.iitb 1. Java 2: The Complete Reference – Patrick Naughton, Herbert Schildt 2. Thinking in Java (http://www.mindview.net/Books/TIJ/) – Bruce Eckel 3. Richard G Baldwin’s “Introductory Java Programming Tutorial” on: http://www.dickbaldwin.com/tocint.htm Books & References
  • 4. nlp-ai@cse.iitb • Structure of Java programs • Compiling and running the program • Printing messages to the screen Contents for Today’s Lecture
  • 5. nlp-ai@cse.iitb 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.
  • 6. nlp-ai@cse.iitb class class-name { public static void main(String args[]) { statement1; statement2; … … } } Structure of Java Programs
  • 7. nlp-ai@cse.iitb “First.java” class First { public static void main(String args[]) { System.out.println(“Hello World”); } } Example Program
  • 8. nlp-ai@cse.iitb 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
  • 9. nlp-ai@cse.iitb 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
  • 10. nlp-ai@cse.iitb • 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
  • 11. nlp-ai@cse.iitb 1. Write a program which prints the following information about at least 5 persons: NAME MAIL-ID EMPLOYEE-CODE PHONE Eg. Umesh umesh@cse p03161 25764728 Salil salil@cse p03160 25764728 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 