Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Use new 1.4 features or not?

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I don't want to annoy anyone by going over old ground, but I'm just trying to get back into the exam after a 6 month break, and have noticed a number of threads regarding the use of the 1.4 JDK with the 1.2 exam.
It seems from the threads that it's o.k to use the new features such as regex, NIO etc.
I currently have implemented my design without these features, and am concerned that I will be marked down for reinventing mechanisms provided by the 1.4 JDK.
Anyone got an opinion?
Thanks
Jason.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you don't have a lot of scope to use either regex or nio anyway. You might want to use the logging framework if you have some logging.
- Peter
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And you won't lose points if you do not use 1.4
Mark
 
town drunk
( and author)
Posts: 4118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jason Moors:
Hi everyone,
I don't want to annoy anyone by going over old ground, but I'm just trying to get back into the exam after a 6 month break, and have noticed a number of threads regarding the use of the 1.4 JDK with the 1.2 exam.
It seems from the threads that it's o.k to use the new features such as regex, NIO etc.
I currently have implemented my design without these features, and am concerned that I will be marked down for reinventing mechanisms provided by the 1.4 JDK.
Anyone got an opinion?
Thanks
Jason.



Hi Jason, glad to see you�re getting to the SCJD. Good luck with it. Now, to answer your questions.
Logging, Exception chaining, regex, assertions, etc., the Thread.holdsock() method, the new String methods, etc., are all solids reasons to use 1.4.
Quite frankly, I like the new tools a lot, and using them for a semi complex, but non-critical, application like the SCJD is a good way to really learn them.
However, I do have a few thoughts, specifically about the NIO features, because they pose an interesting question. I actively discourage it for the sake of networking code, because it doesn�t fit into the paradigm of �simplest to understand�, per the stated requirements.
But.
Using FileChannels deserves some careful consideration. On the one hand, rewriting the code to use FileChannels is a more robust approach, because FileChannels actually interact correctly with Threads that are blocked on IO(which the pre 1.3 jdks do not), and FileChannels are(IMO), cleaner to use.
OTOH, the code already provided for (this) version of the SCJD already has working File IO, and it's generally not a good idea to 'fix' something that isn't too broken.
So what should you do? Whatever you think is right. What did I do? I reluctantly didn't use FileChannels. However, if I had to write the IO code from scratch, FileChannels would have been my choice, hands down.
I guess my opinion is that you'll be better of using the 1.4 features, but I would stay away from NIO for this version of the exam.
Also, if you�d like to read further on this topic, please try
here.
Best regards,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ January 25, 2003: Message edited by: Max Habibi ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic