Saturday, December 13, 2008

Take Online Exams

Java User Group

Today Trick

Try without catch.. ?

Many people believe that if they use try block then they are obligated to continue with catch block, catch some Exception and do something with it

It is not quite right opinion



You can use try block with following finally block without catch, like this:

try {
int i = 10;
//....
// do smth. here
} finally {
int i = -10
//....
// finalize smth here
}

avoiding catch block. Maybe you do need it at all, you simply do not mind about it. It is a fact that many programmers have no code in catch block So, why bother about it all. If you do not have a strategy for error handling do not do it all! Just continue.

Someone still may ask: so why we need try if we do not catch? Is not it simpler to run just plain code without any blocks. Please do not forget that we use try to try something, if it does not go we can continue anyway. Plain code just will stop and cause runtime error, which will break your program flow.

Java 1.5 Features

Generics 3 questions

The Generics Tutorial from Sun covers the basic knowledge that is necessary for this category.

  • Create code that uses Generics.
  • Describe the benefits of Generics.
  • Develop code which deals with legacy code that is not generified.


Enhanced "for" Loop 3 questions

  • Write code that makes appropriate use of the Enhanced for Loop.
  • Identify correct and incorrect usage of the Enhanced for Loop.
  • Explain the limitations of the Enhanced for Loop.

Autoboxing/Unboxing 3 questions

  • Explain what can be done with Autoboxing / Unboxing.
  • Develop code that use Autoboxing / Unboxing.
  • Discuss the appropriate use of Autoboxing / Unboxing.
  • Know that the values true, false, a byte, a char in the range \u0000 to \u007f, or an int or short number between -128 and 127, have special treatment within boxing conversions. And no assumptions can be made about other values.

Typesafe Enums 3 questions

  • Identify the goals of Typesafe Enums.
  • Create enum constructors and explain how to create Enums.
  • Write code that shows the correct and incorrect usage of Typesafe Enums.
  • Use the methods in enums.
  • Work with EnumSet and EnumMap.

Varargs 2 questions

  • Determine the notation of Varargs.
  • Develop code using Varargs.
  • Explain why it is bad practice to overload methods with Varargs.

Static Import 2 questions

  • Write code that use Static Import.
  • Compare the old and the new way of using static members.
  • Discuss best practices of how to use static import.

Metadata (Annotations) 3 questions

An introduction from IBM to Annotations is here.
The definition of Annotations can be found in chapter 9.6 & 9.7 of the Java Language Specification and in the description of the java.lang.annotation package.

  • Identify code that use Annotations.
  • Create code that use standard Annotations.
  • Develop custom Annotations.
  • Explain the advantages of Annotations.
  • Describe what marker annotations and meta-annotations are and how to use them.


Friday, December 12, 2008

Contact Information :

P.Marimuthu,
Java Programmer,
Teknoturf Info Services Pvt Ltd,
126-g,Sengupta Street,
Ram Nagar,
Coimbatore.
TamilNadu,
India.

Mobile : +919789407807

Email : teknoturfian@gmail.com
teknoturfian@yahoo.co.in
teknoturfian@rediffmail.com
teknoturfian@hotmail.com
teknoturfian@ibibo.com
teknoturfian@in.com

Wednesday, December 10, 2008

Welcome To Java Programmers

Those who are interesting to improve your java language,they can share your doubts with me and you can use my blog for improving your java skill..........
Yours Technically,
P.Marimuthu,
Sun Certified Programmer In Teknoturf,
TamilNadu,
India.