Those Strings are hexdecimal. You need Integer.parseInt(yourString, 16)Knute Snortum wrote:. . . use Integer.parseInt(yourString)
Surround this with a class and a main method and next time post the entire file, including any imports. Also include the output of the program generated when you run it.Carey Brown wrote:...have you tried it?...
That is a self‑fulfilling prophecy. Don't go around thinking or saying that sort of thingsoneand pap wrote:. . . I will try but I already know that I won't make it!
There are three kinds of actuaries: those who can count, and those who can't.
Campbell Ritchie wrote:
That is a self‑fulfilling prophecy. Don't go around thinking or saying that sort of thingsoneand pap wrote:. . . I will try but I already know that I won't make it!
![]()
Piet Souris wrote:
But to see if the first part represents an even number, you can also have a look at the second char. What char should that be to make that first number even (and don't forget that second char could be 'A' or 'B' et cetera)?
There are three kinds of actuaries: those who can count, and those who can't.
As I said before, it is a self‑fulfilling prophecy. If you try boldly there is a chance of succeeding. If you believe you can't do it, the belief makes it become the truthsoneand pap wrote:. . . it's the truth though
You can do it in two hours if you find all the hints I gave you.soneand pap wrote:i have 2 more days to solve this exercise..
There is nothing to be sorry about. It will look bad if you fail an assignment and give up. You should try to pass the assignment and then decide whether you would be unhappy making programming a career. There are lots of people who don't like programming, so there is no shame in deciding you don't like it either. But it may hamper your career in a different field if you fail and then give up.Until now i cant and i wont solve it..its very confusing to me so i decided to quit this lesson.
Sorry for the time you guys spend in this thread.
since i cant find someone to help . . . . .
Campbell Ritchie wrote:
You can do it in two hours if you find all the hints I gave you.soneand pap wrote:i have 2 more days to solve this exercise..
i have all the hints you gave me (i think) but i can't put them together!Its frustrating!
Campbell Ritchie wrote:You were so near but so far here, yesterday. Did you actually run your code? You would have got an output of "18:FA:05:11". I referred you to String#split() where it showed you a regex to split "boo:and:foo" and yu copied it incorrectly; Carey told you what the error is. If you correct that, you can have that bit of code working in two minutes.
But we cannot show you the complete working code otherwise that would constitute doing your work for you.
Campbell Ritchie wrote:I still disagree. Complete this exercise, and then quit. That way you can tell whomever you ask for a job or course that you passed but weren't happy with the course.
And if you followed my hints, you could have yout program print 18 in a few minutes.
Because the example you gave started 18.soneand pap wrote:. . . ...and why its"18" all the time?? . . .
Jay Rex wrote:I am a beginner like yourself. I'm six months into my journey with Java.
I experienced exactly the same thing you did. The first few tasks were a breeze and then they asked us to write a program that takes any number from 0.00 to 9999.99 and print out the English word equivalent of what that number is.
I raged for two solid weeks on this one task, but eventually I solved it.
What I can say is that I learnt more from that one task than any other task to date.
System.out.println(whatYouWantToSee) is your best friend right now.
You need to be able to see what your code does. When it shows the right result, then you know you are on the right track. Then write one more line of code and do the same thing again.
Try and try and try again. You can do this
Jay Rex wrote:
You definitely can do this
Jay Rex wrote:The video I linked to also explains what a broadcast mac address looks like.
The requirement is easier now. So now you have one extra condition to deal with.
Take each step I wrote above and write one line of code that tackles that step.
Then ask a specific question about what you don't understand.
This is a good task, and you will learn much.
Again ... No python code posted. Please post that so that we can help check that.soneand pap wrote:I solved this exercise in Python.
Why do you want to do that ? Your requirements hardly span 10 lines of code.soneand pap wrote: Is there a way to convert Python to Java?
salvin francis wrote:Hi soneand,
I just browsed through this entire thread and I see that you haven't posted any code. Most of your posts are complaining about x did not work and y did not work, but there is actually no code posted.
Again ... No python code posted. Please post that so that we can help check that.soneand pap wrote:I solved this exercise in Python.
Why do you want to do that ? Your requirements hardly span 10 lines of code.soneand pap wrote: Is there a way to convert Python to Java?
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
soneand pap wrote:1.i havent posted anything because its wrong and you gonna mock me.thats why i am avoiding it
soneand pap wrote:2.Lets say i upload here the Python code.if there is no way to convert it to java whats the point?
soneand pap wrote:3.10 lines only??No way!!its at least 70 lines
soneand pap wrote:
Piet Souris wrote:
But to see if the first part represents an even number, you can also have a look at the second char. What char should that be to make that first number even (and don't forget that second char could be 'A' or 'B' et cetera)?
i dont understand what you mean.
There are three kinds of actuaries: those who can count, and those who can't.
soneand pap wrote:also a stupid question is "package" necessary in every program??
i am asking because until now i have never write the word "package" in my exercises!
All things are lawful, but not all things are profitable.
This looks like a job for .... legal tender! It says so right in this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|