Differences between jdk 1.4 and 1.5
Answers were Sorted based on User's Feedback
Answer / bantupallinarayanarao
(1). the major enhancement for JDK 1.5 version
Language Features
1. Generics
2. Enhanced for loop
3. Autoboxing/Unboxing
4.Type Safe Enums
5. Varargs
6. Static import
7. Annotations
| Is This Answer Correct ? | 36 Yes | 2 No |
Answer / monu jatav
In jdk 1.4 public static void main(string a[])
but we can use in jdk 1.5
public static void main(string ... a)
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / guest
Generics were introduced in 1.5
JIT compilation was introduced
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nagarjuna j
1.Generics
2.autoBoxing/unBoxing,
3.varargs,
4.type_safe enums,
5.static imports
| Is This Answer Correct ? | 1 Yes | 0 No |
How many techniques can be employed to create a string object?
What is independent and dependent variables in research?
What is the importance of static variable?
Is null an object in java?
what is polymorhism what is inheritance? what is Abstract n Interface? what if two interfaces have same method and a concrete class is implementing both the interfaces. Will there be a compilation error? What are mutable and immutable classes? How can u make a class mutable? when will u use dem ...explain with example? what is overriding and overloading? what is garbage collection? what is Thread? how do dey communicate? what are the different ways of implementing ? have u used any messaging technologies? what is synchronization? what are some additions in java 1.5? what are generics? whst is advanced for loop? what is finally block? can u have a try in finally? yes!! can u have a finally in finally? how do you write junits? when is a object eligible for garbage collection?explain? a = null and b has ref to a will b be eligible to be garbage collected? sql questions like diff joins? how do dey work? exception handling? what is marker interface? what is the need??
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?
Can we split string with in java?
Why is it important to initialize a variable?
What is the primary benefit of encapsulation?
Print Vertical traversal of a Binary Tree.
What are the methods available in a class?
Describe how to implement singleton design pattern in struts.