- Trending Categories
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 primitive type to Byte object in Java
To convert byte primitive type to Byte object, use the Byte constructor.
Here is our byte primitive type.
byte b = 100;
Now let us convert it to Byte object.
Byte res = new Byte(b);
Let us see the complete example.
Example
public class Demo { public static void main(String[] args) { byte b = 100; Byte res = new Byte(b); System.out.println(res); } }
Output
100
- Related Articles
- Convert Byte to numeric primitive data types in Java
- How to convert an object to byte array in java?
- Java Program to convert an UNSIGNED byte to a JAVA type
- Convert byte to String in Java
- Convert short primitive type to Short object in Java
- Java Program to convert byte to string
- Java Program to convert string to byte
- Convert double primitive type to a Double object in Java
- Convert a byte to hexadecimal equivalent in Java
- Convert byte Array to Hex String in Java
- Convert Hex String to byte Array in Java
- Java Program to convert byte[] array to String
- Java Program to convert String to byte array
- How to convert BLOB to Byte Array in java?
- How to convert Byte Array to Image in java?

Advertisements