[Last Call] Learn how to a build a cloud-first strategyRegister Now


How can I convert binary to hexadecimal?

Posted on 2008-11-13
Medium Priority
Last Modified: 2013-12-29
 I have a web service where I receive binary in a String (e.g. "100111001") and I need to convert it to hexadecimal and then to String to return it.  Are there any libraries that do this for me?

Question by:pbenito
  • 2
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 22953133

String hex = Integer.toString(Integer.parseInt("100111001", 2), 16);

Open in new window

LVL 86

Expert Comment

ID: 22953609

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question