Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Topic for JavaRanch Journal Article / SCJP Tipline

 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy folks,

Many of you are probably familiar with my blog, The SCJP Tipline. Additionally, many of you probably spotted my article in last month's edition of The JavaRanch Journal.

Well, I've been asked to write another article for the next edition and I'd like to get some feedback from you, the current SCJP seekers as to what you'd like to see covered.

Here's the catch - I just received the request and the next issue will be coming out early next month. That doesn't leave me much time to get the article completed, so I need suggestions as soon as possible, if they are to be considered. I'll probably begin working on the article this evening after work so I need suggestions to be submitted prior to that.

Topic should include things that are on the SCJP exam or are related to things that are on the SCJP exam. For interesting topics, I don't mind straying a bit from the SCJP objectives. The SCJP Tipline is supposed to be "based" on the SCJP exam, but my goal is to teach people about Java, not about the exam, specifically.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Corey,

Could you start a topic covering the different
aspects of polymorphism and along the way
discuss the way compile time checks and runtime
checks take place (i.e. why ClassCastException occurs).

It looks like polymorphism is quite a tough
topic on the ranch

What do you think, is this interesting enough? Or...

Cheers,

Gian Franco
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco Casula:

Could you start a topic covering the different
aspects of polymorphism and along the way
discuss the way compile time checks and runtime
checks take place (i.e. why ClassCastException occurs).


That would be a good topic, I think. I'm still open to more suggestions, but I'll certainly take this one into consideration. Thanks, Gian.

Of course, you can always check out the Campfire to find this.
 
Chris Allen
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about a discussion of the various Collection interfaces (i.e. Set/List/Map/SortedSet/SortedMap) and the Collections classes (i.e. ArrayList/HashMap/LinkedList/TreeMap)? Maybe it is too large for one entry and could be split into two parts?
[ June 29, 2004: Message edited by: Chris Allen ]
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again Corey,

Maybe it would be an idea to write a topic on how
to write a little program that covers a couple of
objectives of the SCJP like Collections and Threads
and a pinch of polymorphism .

An example might be a program that simulates JavaRanchers
sending questions, moderators replying to them or moving
questions to other forums. (each forum is a Collection of
some kind, the JavaRanchers are threads and the moderators
too.

Good luck with your article

Cheers,

Gian Franco
 
Anil Hulikal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Corey,

How about the good ol' immutability of Strings? :-) This topic seems to draw too much attention in the forum. When we are at it, why not try and make some fundamentals simpler?

In my humble opinion, the explanation about "strings" (a.k.a string literals) and "String" (objects) can be further simplified in most books if we could make a comparison at a very coarse level with primitives and wrapper classes. There are key concepts that we, the readers (the truth seekers), somehow miss out while trying to understand strings, String and the heap (and the "hazy" stack).

1. A string literal is simply a "string" of characters. In other words it is just a 'character string': Not an object. It has no state or behavior. No methods are available to manipulate a string of characters directly. Having said that, it also has to be made clear that JVM/platform accepts any string of characters when it requires a String Object. That is when a "string" gets converted into a "String" thereby facilitating the use of methods (for example, concatenation) available in the String class.
2. A String is an Object. It has a state and behavior

Now, if we ignore the storage mechanism, for a moment or forever, doesn't String class just look like a wrapper class for "string literals"? Can something on these lines be explained. I do not intend to make a vis-a-vis comparison with other primitives and their corresponding wrapper classes. But, why not call java.lang.String as a "special" type of wrapper class for "a string of characters"?

Thanks and regards,
Anil
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anil,

I had been considering an article on the immutabililty of String, the String literal pool, and the ramifications of that to garbage collection. I'm still looking for more suggestions, but that one has been on my list.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Corey,

Something that would be interesting is the
explanation of how the
javap -c

listing should be interpreted to solve some simple
questions regarding a small program.

Cheers,

Gian Franco
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for Looking "Under the Hood" with javap
 
Inuka Vincit
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is kind of a broad topic. But the Java language specification has a bunch wierd corner cases(they do seem logical). However specis are written in a not so friendly manner. It would be realy great if you could cover the important parts of it.

I realy liked your article about methods. It made some things very clear, then again there are one or two weird cases that are supplied in the specs that confused the hell out of me when I ran across them in practice tests.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gian,

You're certainly welcome. Feel free to give me more ideas for articles. I'm always looking for things to write about for the next edition of the journal or for my blog.

Benjamin,

Can you give some specifics about the things you're running into that have confused you? Maybe an example or two. Perhaps I can address those cases specifically.

Is there a part of the JLS that you're having trouble interpreting? I know the JLS can be pretty daunting at first, but just keep at it and pretty soon you won't have as much trouble reading it.
 
Akshatha Nayak
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Corey , how abt local classes , anonymous classes & nested classes ..
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about reasons why an intelligent guy like yourself would want to live in Minnesota??

ok... maybe not.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akshatha,

Check out these posts in my blog:

Inner Classes
Inner Classes: Anonymous Classes
Inner Classes: Local Classes
 
Shruti Kale
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about some insight on assertions??
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so seriously this time -- how about the magical world of implicit / explicit casting of primitives?
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm...all these good ideas. It appears I have some writing to do.
 
Inuka Vincit
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Corey McGlone:
Gian,

You're certainly welcome. Feel free to give me more ideas for articles. I'm always looking for things to write about for the next edition of the journal or for my blog.

Benjamin,

Can you give some specifics about the things you're running into that have confused you? Maybe an example or two. Perhaps I can address those cases specifically.

Is there a part of the JLS that you're having trouble interpreting? I know the JLS can be pretty daunting at first, but just keep at it and pretty soon you won't have as much trouble reading it.


I am curious as to why this case happens(still reading throug the specs havent got to this part yet)
Things like this
1. The null pointer
1.
class Test
{
void Ranch(String st)
{ System.out.println("I have a String"); }

void Ranch(Object o)
{ System.out.println("I have an Object"); }

public void main(String gr[])
{ Test t=new Test(); t.Ranch(null }
} //results is not a compiler error I have a String

2. The ability to access a static method through a null pointer. Cant seem to find the exactl excample.


The second idea is the class chapter in the specs(8). In more detail I would think the following would be usefull, since I havent come across at leat half of the stuff in 8 in books or online articles(maybe I havent read enough). Specially the multiple inheritance case, so multiple inheritance case could be an other idea

1.multimple inheritance
8.1.4 Super interfaces. What happens when you do multiple inheritance of same method(same sig),
8.3.3.2 8.3.3.3 8.3.3.4 Hiding variables, multiple inheritance of fields, re-inheritance.

8.4.6 Inheritance, Overriding and Hiding


2. Restrictions on initializers 8.3.2


Thats all the ideas I got. Thanks for writing up







[ August 27, 2004: Message edited by: Inuka Gunawardana ]
[ August 27, 2004: Message edited by: Inuka Gunawardana ]
 
Krishna Srinivasan
Ranch Hand
Posts: 1874
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you write article abour assertions?
most of us are not familiar with that concept.it will be helpful if you are writing an article explaining assertion concepts.
 
Ravi Kotaru
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An article on Bit wise operators, especially shift operators, would be good.
They generally do take lot of time in the exam.
Tips on how to find out the correct answer with out need to converting to binary and again back to decimal are very much needed.

thanks in advance
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ravi Kotaru:
An article on Bit wise operators, especially shift operators, would be good.
They generally do take lot of time in the exam.

check out this article by Corey: The SCJP Tip Line: Bit Shifting
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also wrote an article in my blog that covered bit shifting. It goes a little more in depth than the journal article. You can find it here.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Krishna Srinivasan:
can you write article abour assertions?
most of us are not familiar with that concept.it will be helpful if you are writing an article explaining assertion concepts.


Krishna,

Check out the September 2002 Journal. In that edition, you'll find two articles on using assertions.

Asserting Yourself In Public, by Cindy Glass
Assertions - Debugging in J2SE 1.4, by Thomas Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic