Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion _posts/java-string/2021-02-27-convert-int-to-string.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,26 @@ Output
```java
numberString: 1234
```
If you found this article worth, support me by [giving a cup of Coffee ☕](https://www.paypal.me/GauravKukade)

## Conclusion

We can convert an int to String in Java using

1. the String.valueOf() method

```java
String numberString = String.valueOf(number);
```

2. the Integer.toString() method.

```java
String numberString = Integer.toString(number);
```
In both cases, `number` is an `int` value.

If you found this article worth, support me by [giving a cup of Coffee ☕](https://www.paypal.me/GauravKukade)


### Related Articles

Expand Down