Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,903 members, 7,817,677 topics. Date: Saturday, 04 May 2024 at 05:02 PM

Java Prog That Converts Binary To Decimal - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Prog That Converts Binary To Decimal (2659 Views)

Top 5 Free Scala Prog. Books 4 Java Programmers, Download As PDF Or Read Online / How Do I Make A Java Prog Run At Startup? / Help Me Improve On My Prog Skill (2) (3) (4)

(1) (Reply) (Go Down)

Java Prog That Converts Binary To Decimal by tosinadeda: 12:51am On Jan 16, 2008
plssssssssssssssss i need help on his
Re: Java Prog That Converts Binary To Decimal by proxies(m): 8:00pm On Jan 16, 2008
ehen , ur plan no go work o, so na here u wan do ur assignment abi, anywayz, pay me make i give u d answer, u fit py in kind(gimme a sweet babe) too oooo grin
Re: Java Prog That Converts Binary To Decimal by buyolala(m): 2:04am On Jan 17, 2008
hi guy

i see yours as a simple problem trusting fellow nairalandians

watch out

good luck
Re: Java Prog That Converts Binary To Decimal by chukxy: 6:03pm On Jan 17, 2008
hi guy, I just read your post.
I promise to give you the solution morrow.
Stay connected.
Tnx.
Re: Java Prog That Converts Binary To Decimal by larekey(m): 8:27pm On Jan 17, 2008
poster
this is my first time of logging into this section i googled ur request and i think u should check out this link it might help u out cheers
http://forum.java.sun.com/thread.jspa?threadID=688546&messageID=4005564
if i see more i'd keep u updated
Re: Java Prog That Converts Binary To Decimal by Bossman(m): 10:36pm On Jan 17, 2008
What have you done so far? I suggest that you at least take a stab at it, then when you get stuck, post here for some assistance or check the forums.

This sounds like a homework assignment. We will not be doing you any favour by doing it for you. Believe me, the "real world" is brutal! You have to be able to solve problems on your own for you to be a developer. If you can't, they will get rid of you quickly. That's if you get past the interview process. I occasionally participated in Java technical interviews at previous clients. Your problem solving skills are very critical your survival as a developer. Enough said!
Re: Java Prog That Converts Binary To Decimal by proxies(m): 8:21am On Jan 18, 2008
@ bossman


if u dont have a solution then u say rather thn telling u it's an homework,

anyway, na u sabi?
Re: Java Prog That Converts Binary To Decimal by SayoMarvel(m): 4:46pm On Jan 18, 2008
Good News, Calculator+ (a program that i coded by myself) with incredible GUI and also extremely user friendly has that as one of its functions. But oops, the program is not free of charge. If you need it, you have to buy. My e-mail address is marvelindaclub@yahoo.com

-Me, Myself & I.
Re: Java Prog That Converts Binary To Decimal by SayoMarvel(m): 4:49pm On Jan 18, 2008
Good News, Calculator+ (a program that i coded by myself) with incredible GUI and also extremely user friendly has that as one of its functions. But oops, the program is not free of charge. If you need it, you have to buy. My e-mail address is               marvelindaclub@yahoo.com
If you can't afford it, then go and study the math class of Java.Lang package thoroughly.


-Me, Myself & I.
Re: Java Prog That Converts Binary To Decimal by chukxy: 5:00pm On Jan 18, 2008
pally, just like i promised yesterday, here is the solution to the problem:

class BinaryDec
{
public static void main(String arg[])
{
String binaryno = arg[0];
int decno;
decno= Integer.parseInt(binary,2);
System.out.println(''The Decimal equivalent =''+decno);
}
}

compile, javac BinaryDec.com
run java BinaryDec 1101

the ans will be 13.

Thanks and stay connected.
Re: Java Prog That Converts Binary To Decimal by emmotions: 9:41pm On Jan 22, 2008
HELLO PROGRAMMERS IN JAVA,

I NEED JDK Compiler on my Computer. How do I get it. Can anyone help with a site where I could get it or if you have any in your flash, please help me with it. I need it, so I could practise on my Computer.

here is my email: emmotionalkuns@yahoo.com
Re: Java Prog That Converts Binary To Decimal by tosinadeda: 9:45pm On Jan 22, 2008
proxies:

ehen , your plan no go work o, so na here u wan do your assignment abi, anywayz, pay me make i give u d answer, u fit py in kind(gimme a sweet babe) too oooo grin


i give u ur sister, abi she no sweet ni
chukxy:

pally, just like i promised yesterday, here is the solution to the problem:

class BinaryDec
{
public static void main(String arg[])
{
String binaryno = arg[0];
int decno;
decno= Integer.parseInt(binary,2);
System.out.println(''The Decimal equivalent =''+decno);
}
}

compile, javac BinaryDec.com
run java BinaryDec 1101

the ans will be 13.

Thanks and stay connected.


thanks man
Re: Java Prog That Converts Binary To Decimal by proxies(m): 9:02am On Jan 23, 2008
the program run??
Re: Java Prog That Converts Binary To Decimal by Centey(m): 4:46pm On Jan 23, 2008
[color=#000099][/color]
chukxy:

pally, just like i promised yesterday, here is the solution to the problem:

class BinaryDec
{
public static void main(String arg[])
{
String binaryno = arg[0];
int decno;
decno= Integer.parseInt(binary,2);
System.out.println(''The Decimal equivalent =''+decno);
}
}

compile, javac BinaryDec.com
run java BinaryDec 1101

the ans will be 13.

Thanks and stay connected.


The program is a good one and it actually ran.
However on compilation, it threw some errors
1. The variable declared was binaryno in line 5 but the variable used in line 7 was binary, thus change binary to binaryno in line 7
2. The quotations marks should be double qoute " and not two single quotes '' in line 8

Good program, Kudos
Re: Java Prog That Converts Binary To Decimal by chukxy: 5:24pm On Jan 24, 2008
If you had compiled this program before now, it must have displayed error during compilation due to mistake in line 7; but i have just corrected th error. So you can go on compile and run the program.

Thanks.

pally, just like i promised yesterday, here is the solution to the problem:

class BinaryDec
{
public static void main(String arg[])
{
String binaryno = arg[0];
int decno;
decno= Integer.parseInt(binaryno,2);
System.out.println(''The Decimal equivalent =''+decno);
}
}

compile, javac BinaryDec.com
run java BinaryDec 1101

the ans will be 13.

Thanks and stay connected.
[/color][color=#990000][/color][color=#990000]
Re: Java Prog That Converts Binary To Decimal by SayoMarvel(m): 3:07pm On Feb 01, 2008
Good of You! I luv ur program but there are some defects that u have to fix.

(1)The truth is that many people hate simple programs running in command prompt. Atleast a litttle GUI will make it more user friendly.
(2)You have to re-execute the program for each binary number that you want to compile.

Solution
When next I visit nairaland, i will paste full source code for conversions(binary,hexadecimal,octaldecimal,decimal).

keep cool programmers!!!

peace out.

(1) (Reply)

Help With A Java Project... / Become A Pro In Programming For Only N6000 / Desktop Application Vs Web Application

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.