Languages
[Edit]
EN

Java - convert binary String to long

13 points
Created by:
Root-ssh
178290

Short solution:

The best way to convert binary String to long in java is to use Long.parseLong() method.

Syntax:

1. Simple example

Edit

Output:

2. Convert couple of different binary strings to long

Edit

Output:

3. Convert binary string to long in loop - from 0 to 16

Edit

In this example we convert binary string to long in loop from 0 to 16 and then we print both binary and long representations of given number.

Output:

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java conversion

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join