• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

What the heck is.....

 
Greenhorn
Posts: 11
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey I got a problem that I'm hoping someone can help me with. I'm still fairly new to Java, but this problem I feel is definitely for you advance people who I hope will kindly point me in the right direction. I'm an Intern and working for someone on creating a website for them and they asked me to create a counter for them and they aren't giving me much time so I figure the best route would be to decompile the class file to go from there. Well in decompiling it didn't do it correctly and I'm really hoping someone can help me out so to get to the point does anyone know what the heck is "0xb2d05e00L" below is all of the source code that hopefully will help you to better understand it. Thanks in advance for the help.

Matt



[ Jess added UBB [code] tags to perserve whitespace ]
[ July 27, 2004: Message edited by: Jessica Sant ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
0x is a prefix for all numbers in Hexadecimal format (base 16)
0 is a prefix for all numbers in octal format (base 8)
all other numbers are in standard decimal format.

So... 0xb2d05e00 is really 3,000,000,000 (I'm guessing they wrote it in hex so they wouldn't goof and miss a zero).

The suffix "L" means that the number should be interpretted as a long rather than an int.
[ July 27, 2004: Message edited by: Jessica Sant ]
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does anyone know what the heck is "0xb2d05e00L" below is all of the source code that hopefully will help you to better understand it.

0xb2d05e00L (hex) just happens to be equal to 3000000000L (decimal), and it looks to me like a way to provide a few leading zeroes to the counter's display
[ July 27, 2004: Message edited by: Dmitry Melnik ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the Intermediate forum, so please add any replies there. Thanks!
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to consider a few things:

a) It is probably illegal for you to decompile some arbitrary .class file.
b) Regardless of the licence for use of the software, you might be implicating the company that you are doing your internship for, in a lawsuit for breach of copyright.
c) The cost of producing a counter by someone other than yourself is neglible when compared to cost of any lawsuit - especially one such as the possible one as a result of your actions.
d) What you are doing is unethical and considered very unprofessional - an internship often leads to a job - in this case, I would recommend against someone who actively engages in unethical behaviour (I have successfully recommended all interns that I have worked with in the past).
e) Why don't you simply learn how to do it properly anyway? If you don't know how to learn, you will have serious problems once you step into the industry (no, we don't make counters all day ).
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well said Tony.

If you don't have enough time you may not be the person for the job which is very valuable information when evaluating an intern.

You're not ready for the real world, trying to cheat yourself into a job by stealing someone else's code will not help you in the long run in that you won't be able to do your job properly.
It can also lead to severe legal trouble for you and the company (if the company gets sued they'll almost certainly fire you on the spot and sue you in turn, it could get you in prison too).
 
Matthew Buska
Greenhorn
Posts: 11
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok thank you for the help and the lecture. For those of you who lectured me I didn't mean to give the impression I was stealing code from somebody. The class file I got this from is from the same company that my company is working on redesigning their website and who owns the copyright to it and I'm merely just editing it with everyone's approval. Surely if I actually did stole this code from someone I wouldn't be stupid enough to say that I did.
[ July 28, 2004: Message edited by: Matthew Buska ]
 
What's brown and sticky? ... a stick. Or a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic