SlideShare a Scribd company logo
1 of 51
String  and  StringBuilder Part I:  String
About Strings ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods I ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods II ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods III ,[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods IV ,[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods V ,[object Object],[object Object],[object Object],[object Object]
Understanding “index” ,[object Object],[object Object],[object Object],[object Object],"She said, amp;quot;Hiamp;quot;" 0  1  2  3  4  5  6  7  8  9  10  11 12  13 "She said, amp;quot;Hiamp;quot;" 0  1  2  3  4  5  6  7  8  9  10  11  12 13  14
Useful  String  methods VI ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  String  methods VII ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Finally, a  useless   String  method ,[object Object],[object Object],[object Object],[object Object]
Strings are immutable ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
More about  equals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Still more about  equals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Strings, Etc. Part II:  StringBuilder
About  StringBuilder s ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
StringBuilder  constructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  StringBuilder  methods I ,[object Object],[object Object],[object Object]
Useful  StringBuilder  methods II ,[object Object],[object Object],[object Object],[object Object]
Useful  StringBuilder  methods III ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  StringBuilder  methods IV ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful  StringBuilder  methods V ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
When to use  StringBuilder s ,[object Object],[object Object],[object Object]
Strings, etc. Part III: Characters
The  Character  class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some  Character  methods ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exceptions
Errors and Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What to do about errors and exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dealing with exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The problem with exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Three approaches to error checking ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The  try  statement ,[object Object],[object Object],[object Object],[object Object]
Exception handling is  not  optional ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Error  and  Exception  are  Object s ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The exception hierarchy ,[object Object],[object Object],[object Object],[object Object],[object Object]
The Exception hierarchy II Throwable Error Exception RuntimeException Must be caught Need not be caught
A few kinds of Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What to do about Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What to do about Exceptions II ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How to use the  try  statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
finally ,[object Object],[object Object],[object Object],[object Object],[object Object]
How the  try  statement works ,[object Object],[object Object],[object Object],[object Object]
Ordering the catch phrases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using the exception ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
printStackTrace() ,[object Object],[object Object],[object Object],[object Object],[object Object]
Throwing an Exception ,[object Object],[object Object],[object Object],[object Object]
Constructing an  Exception ,[object Object],[object Object],[object Object],[object Object]
Throwing an  Exception ,[object Object],[object Object],[object Object],[object Object]
Why create an Exception? ,[object Object],[object Object],[object Object],[object Object]
 

More Related Content

What's hot

Java căn bản - Chapter9
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9
Vince Vo
 
Presentation 2nd
Presentation 2ndPresentation 2nd
Presentation 2nd
Connex
 

What's hot (19)

An Introduction : Python
An Introduction : PythonAn Introduction : Python
An Introduction : Python
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board ExamsC++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
 
Data Handling
Data HandlingData Handling
Data Handling
 
Python-04| Fundamental data types vs immutability
Python-04| Fundamental data types vs immutabilityPython-04| Fundamental data types vs immutability
Python-04| Fundamental data types vs immutability
 
Java căn bản - Chapter9
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9
 
Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
 
DISE - Windows Based Application Development in Java
DISE - Windows Based Application Development in JavaDISE - Windows Based Application Development in Java
DISE - Windows Based Application Development in Java
 
Notes on c++
Notes on c++Notes on c++
Notes on c++
 
+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II Notes+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II Notes
 
Chapter 9 python fundamentals
Chapter 9 python fundamentalsChapter 9 python fundamentals
Chapter 9 python fundamentals
 
Python revision tour II
Python revision tour IIPython revision tour II
Python revision tour II
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
 
Presentation 2nd
Presentation 2ndPresentation 2nd
Presentation 2nd
 
Data types, Variables, Expressions & Arithmetic Operators in java
Data types, Variables, Expressions & Arithmetic Operators in javaData types, Variables, Expressions & Arithmetic Operators in java
Data types, Variables, Expressions & Arithmetic Operators in java
 
Python unit 2 M.sc cs
Python unit 2 M.sc csPython unit 2 M.sc cs
Python unit 2 M.sc cs
 
ITFT-Constants, variables and data types in java
ITFT-Constants, variables and data types in javaITFT-Constants, variables and data types in java
ITFT-Constants, variables and data types in java
 
Python second ppt
Python second pptPython second ppt
Python second ppt
 
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
 

Similar to M C6java7

Strings Arrays
Strings ArraysStrings Arrays
Strings Arrays
phanleson
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
kamal kotecha
 
16 Java Regex
16 Java Regex16 Java Regex
16 Java Regex
wayn
 

Similar to M C6java7 (20)

Chapter 9 - Characters and Strings
Chapter 9 - Characters and StringsChapter 9 - Characters and Strings
Chapter 9 - Characters and Strings
 
Strings
StringsStrings
Strings
 
String handling
String handlingString handling
String handling
 
Strings.ppt
Strings.pptStrings.ppt
Strings.ppt
 
Module-1 Strings Handling.ppt.pdf
Module-1 Strings Handling.ppt.pdfModule-1 Strings Handling.ppt.pdf
Module-1 Strings Handling.ppt.pdf
 
Strings Arrays
Strings ArraysStrings Arrays
Strings Arrays
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
 
String in programming language in c or c++
String in programming language in c or c++String in programming language in c or c++
String in programming language in c or c++
 
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSTRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
 
16 Java Regex
16 Java Regex16 Java Regex
16 Java Regex
 
Python data handling
Python data handlingPython data handling
Python data handling
 
C string
C stringC string
C string
 
Chapter 4 (Part II) - Array and Strings.pdf
Chapter 4 (Part II) - Array and Strings.pdfChapter 4 (Part II) - Array and Strings.pdf
Chapter 4 (Part II) - Array and Strings.pdf
 
string in C
string in Cstring in C
string in C
 
In the given example only one object will be created. Firstly JVM will not fi...
In the given example only one object will be created. Firstly JVM will not fi...In the given example only one object will be created. Firstly JVM will not fi...
In the given example only one object will be created. Firstly JVM will not fi...
 
Week6_P_String.pptx
Week6_P_String.pptxWeek6_P_String.pptx
Week6_P_String.pptx
 
String Handling, Inheritance, Packages and Interfaces
String Handling, Inheritance, Packages and InterfacesString Handling, Inheritance, Packages and Interfaces
String Handling, Inheritance, Packages and Interfaces
 
Lesson in Strings for C Programming Lessons
Lesson in Strings for C Programming LessonsLesson in Strings for C Programming Lessons
Lesson in Strings for C Programming Lessons
 
Computer programming 2 Lesson 12
Computer programming 2  Lesson 12Computer programming 2  Lesson 12
Computer programming 2 Lesson 12
 
Strings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiStrings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothi
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

M C6java7