Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2da129d

Browse files
authored
Merge pull request #15 from coderolls/video/add-reverse-string-in-java-video-link-to-blog
Add link for reverse string and string to int videos in respective blogs
2 parents b2706e9 + 04f4850 commit 2da129d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

_posts/java-string/2019-12-02-reverse-a-string-in-java.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@ Output:
7979
```java
8080
The reversed string of the 'coderolls.com' is: moc.slloredoc
8181
```
82+
8283
#### Note:
8384
In the `for` loop, I have assigned `blogName.length()-1` to i instead of `blogName.length()` because the characters in the string are indexed from 0.
8485

8586
I have given an image below to show the string indexing.
8687

8788
![Showing indexes of the characters in the string.](/assets/images/2019-12-02/string-indexing.png)
8889

90+
Also you can watch [the video on my youtube channel for reverse a string with the above method](https://www.youtube.com/watch?v=vrTYrQuB0BE).
91+
92+
[![How To Reverse A String In Java](https://img.youtube.com/vi/vrTYrQuB0BE/0.jpg)](https://www.youtube.com/watch?v=vrTYrQuB0BE "How To Reverse A String In Java")
93+
8994
## 2. Using `getBytes()` method of String
9095
In the `getBytes()` method of Java String first encodes the specified string into the sequence of bytes using the platforms default charset and then save the result in the byte array. The same byte array will be returned.
9196
```java

_posts/java-string/2020-01-05-convert-string-to-int.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ I have listed down two ways to convert a String into an Integer.
2222
1. Using the `Integre.parseInt()` method
2323
2. Using the `Integer.valueOf()` method
2424

25+
You can watch [the video on my youtube channel for "How To Convert A String To An Integer In Java"](https://www.youtube.com/watch?v=pNHjvpNHVCs).
26+
27+
[![How To Convert A String To An Integer In Java](https://img.youtube.com/vi/pNHjvpNHVCs/0.jpg)](https://www.youtube.com/watch?v=pNHjvpNHVCs "How To Convert A String To An Integer In Java")
28+
2529
Now we will see the above ways to convert string to integer one by one.
2630

2731
## Using the `Integre.parseInt()` method
@@ -85,7 +89,7 @@ Output
8589
134
8690
```
8791

88-
## Let us know about `NumberFormatException`
92+
## A Note about `NumberFormatException`
8993

9094
When you are trying to convert a string to integer but your string contains a value other than the decimal digits, then bothe the methods (`Integre.parseInt()` method and `Integer.valueOf()` method) will throw the `NumberFormatException`.
9195

0 commit comments

Comments
 (0)