Results 1 to 1 of 1
- 09-13-2011, 03:35 AM #1
Advice On First Program (binary to decimal converter)
Alright so I've been trying to learn how to program in java(pretty obvious huh?) and I'm about as new to this as they come, so please be gentle. Ok so for some inexplicable reason I've decided that for my first program I'd like to try making a binary and hexadecimal to decimal converter, that can be used on text files. After about a week this is how far I've gotten:
[Java] Binary.java - Pastebin.com
After finishing that I started working on the hexadecimal part. That's when I discovered the Integer.decode method:
Integer (Java Platform SE 6)
I realized that by simply imitating them and adding a few lines of code I could get this work on binary numbers as well:
[Java] Number.java - Pastebin.com
Basically what I really l'm looking for is some general advice on Binary.java, considering It's the first program I've ever written from scratch. Sooo:
- How's my code, am I using java correctly?
- What am I doing wrong and what could I do better?
- How efficient, comparatively, are these two programs?
- What am I actually telling the jvm to do?
- How many steps are there, are they all necessary?
Hopefully I haven't done or said anything stupid in my first post, if I have please tell me, I'd prefer not to start off on the wrong foot. All advice and criticism welcome!
- By irnie1994 in forum JCreatorReplies: 5Last Post: 08-25-2011, 07:32 PM
- By matejm1994 in forum New To JavaReplies: 3Last Post: 12-26-2010, 10:59 AM
- By c_walker in forum New To JavaReplies: 15Last Post: 11-24-2009, 03:38 PM
- By tOpach in forum New To JavaReplies: 4Last Post: 10-26-2009, 11:17 PM
- By WarmRegards in forum New To JavaReplies: 8Last Post: 10-18-2009, 02:32 PM