This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jdk question  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got an assignment recently and for now I have only one question. As far as I understood I may use for development jdk1.4.(something latest) and jdk1.5.0. But the question is, what should I do with some code differencies between two platforms. Is it permitted to use some Java 5 specific code and language features? (like asserts, templates and new concurrency classes)
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
of course. As long as you state you're using 1.5 you can use the full force of the platform.
If you state you're using 1.4 of course you can't use any of the new features as your sources are supposed to compile with a 1.4 compiler and the classes to run on a 1.4 runtime (which 1.5 compiled classes won't).
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JDK 1.5 without NIO. JDK 1.5 has more function on string & other lot of things but mention that in your version.txt
 
Vadik Mironov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also thought about features of 1.5, but had some concerns. OK, now it is clear, thanks a lot
 
Vadik Mironov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No NIO, but what about java.util.concurrent.* packages. Is it allowed?
 
author and jackaroo
Marshal Commander
Posts: 12211
272
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vadik,

No NIO, but what about java.util.concurrent.* packages. Is it allowed?

Anything that is not explicitly disallowed in your instructions is implicitly allowed.

And yes, that does mean that NIO is allowed in most cases.

Regards, Andrew
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!