• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Journal Article - Looking "Under the Hood" with javap

 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The just-released August 2004 edition of The JavaRanch Journal includes an article by Corey McGlone, "The SCJP Tip Line - Looking "Under the Hood" with javap".

Please use this thread to comment on and discuss the article.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see this as a bit of a distraction in my preparation for the scjp. I mean how can that help me. The exam objectives already saddles one with so many bits and pieces to learn and remember. Don't you think studying the bytecode which is a little bit arcane will certainly introduce an intricate dimension to the scjp preparation and compound issues ?
 
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jonas,

well, you interpretation about this is actually very wrong. It is def. not going to help you in the exam as you can not compile or run your programs at that time. But when you are studying and if you get in to trouble then Bytecode might be of help. You can actually understand what is happening in the memory. Its just that if you master the art of bytecode, only then it will help you.

Bye
Kaps
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by jonas okwara:
I see this as a bit of a distraction in my preparation for the scjp. I mean how can that help me. The exam objectives already saddles one with so many bits and pieces to learn and remember. Don't you think studying the bytecode which is a little bit arcane will certainly introduce an intricate dimension to the scjp preparation and compound issues ?



I don't recommend taking hours and hours to learn the entire bytecode spec during your SCJP preparation. On the other hand, to learn enough about bytecode to be able to read it (at least moderately) takes but a few minutes.

Somewhere along the way, you're bound to run into a real "stumper" of a question. Heck, I've been moderating this forum for quite a while now and I still run into questions like that from time to time. Knowing about javap simply gives you another tool to try to figure out what's really happening.

So, do you need to understand bytecode to get your SCJP certification? Absolutely not. Might it help you? Maybe - if you use it. It's just another tool. Feel free to use it if you want or ignore it if you don't. For some folks, it's a very useful tool, for others, it's an interesting tidbit, and for others, it's not of any use. It really depends upon your own personality and how you like to work. Personally, I find it interesting, but I seldom use it. I do, however, find it very useful from time to time.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by jonas okwara:
I see this as a bit of a distraction in my preparation for the scjp. I mean how can that help me. The exam objectives already saddles one with so many bits and pieces to learn and remember. [...]

Because if you develop an understanding for how the language hangs together, there are so many fewer bits and pieces to remember. This requires an eye for patterns and underlying principles though; that's not everyone's learning style. But if it is yours, javap gives you a great look under the hood.

- Peter
 
Ranch Hand
Posts: 130
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very sorry if I have not understood the article in the first place. Really very nice article, hats off to the writer Corey McGlone.

Here the String object "Test" referred by local variable one, two, three and referred by four, both are getting created on heap memory? Then what is string pool? I came to know that string pool is a part of heap memory which is specially reserved for string constants is that right? Is that what mentioned as heap memory here?
bit confused between :

1> What actually is string pool? Is it a separate memory or part of the heap memory reserved for String constants?
2> Is both the objects(in the article) are getting created in String pool?

Please help.
Kind regards,

 
    Bookmark Topic Watch Topic
  • New Topic