- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Convert byte to String in Java
The valueOf() method is used in Java to convert byte to string.
Let’s say we have the following byte value.
byte val = 40;
Converting the above byte to string.
String.valueOf(val);
Example
public class Demo { public static void main(String[] args) { byte val = 40; // converting String str = String.valueOf(val); System.out.println("String: "+str); } }
Output
String: 40
Advertisements