This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java very beginner need help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java very beginner need help!! " Watch "Java very beginner need help!! " New topic
Author

Java very beginner need help!!

Qing Tian
Greenhorn

Joined: Aug 17, 2004
Posts: 10
Thanks a lot for your help and I had removed my code because it is too terrible for read and help also it had a lot error, so I read more and fix some error (hope I can), and then ask for help!

Ray was right this is one of my practical question but no marke on it
anyway thanks for help.
[ August 21, 2004: Message edited by: Qing Tian ]
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
Can you say what the error is, specifically? Do you get no output at all, or do you get an incorrect number - say, the digits are in reverse order or something?

It might also help if you surround your code with "code" tags to make it more legible. If you stick to spaces for indentation, we'll all be able to see the indentation that you intended, as well.

Did you know there are two different Integer.parseInt functions? You might check it out. There are some other static Integer functions that might be of interest, too, if you're allowed to use them.
Ray Muirhead
Ranch Hand

Joined: Jun 11, 2004
Posts: 44
Hi Qing,

I've had a bit of a look at your code in jEdit with the syntax highlighter and indenting, and I can see a bunch of syntax errors and stuff - you really need to get those before you can fix the larger problem.

For loop control instructions need to be separated by semicolons:



and you are going to need to out of your switch statement, for starters.

I'd suggest reading up a lot on basic java (I know it is hard when you have a pressing problem) and figuring out how you can convert binary to hexadecimal and vice versa on paper, with psuedocode or just logic, whatever helps you see what is going on. There is a great <a href="http://www.javaranch.com/style.jsp">style guide</a> on this site too, that helps you read your code a lot easier, and will help both your markers (I assume) and other people here read it too.

Good luck!
 
GeeCON Prague 2014
 
subject: Java very beginner need help!!