Friday 26 August 2011

Important Basic C Programs in Interview Asked

(A) Write a c program to check given string is palindrome number or not

#include<string.h>
#include<stdio.h>
int main(){
  char *str,*rev;
  int i,j;
  printf("\nEnter a string:");
  scanf("%s",str);
  for(i=strlen(str)-1,j=0;i>=0;i--,j++)
      rev[j]=str[i];
      rev[j]='\0';
  if(strcmp(rev,str))
      printf("\nThe string is not a palindrome");
  else
      printf("\nThe string is a palindrome");
  return 0;
}

Definition of Palindrome string:

A string is called palindrome if it symmetric. In other word a string is called palindrome if string remains same if its characters are reversed. For example: asdsa
If we will reverse it will remain same i.e. asdsa

Example of string palindrome:  a,b, aa,aba,qwertrewq etc.

(B) check the given number is palindrome number or not using c program

#include<stdio.h>
int main(){
int num,r,sum=0,temp;
printf("\nEnter a number:");
scanf("%d",&num);
temp=num;
while(num){
r=num%10;
num=num/10;
sum=sum*10+r;
}
if(temp==sum)
printf("\n%d is a palindrome",temp);
else
printf("\n%d is not a palindrome",temp);
return 0;
}

Definition of Palindrome number:

A number is called palindrome number if it is remain same when its digits are reversed. For example 121 is palindrome number. When we will reverse its digit it will remain same number i.e. 121

Examples of palindrome number: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191 etc.

(C) CHECKING LEAP YEAR USING C PROGRAM

#include<stdio.h>
#include<conio.h>
void main(){
    int year;
    clrscr();
    printf("Enter any year: ");
    scanf("%d",&year);
    if(((year%4==0)&&(year%100!=0))||(year%400==0))
         printf("%d is a leap year",year);
    else
         printf("%d is not a leap year",year);
    getch();
}

Definition of leap year :

Rule 1 : A year is called leap year if it is divisible by 400.
For example : 1600,2000  etc leap year while 1500,1700 are not leap year.
Rule 2 : If year is not divisible by 400 as well as 100 but it is divisible by 4 then
that year are also leap year.
For example:  2004,2008,1012 are leap year.

Algorithm of leap year :

IF year MODULER 400 IS 0
THEN leap_year
ELSE IF year MODULER 100 IS 0
THEN not_leap_year
ELSE IF year MODULER 4 IS 0
THEN leap_year
ELSE
not_leap_year



(D) Write a c program to check given number is strong number or not.

#include<stdio.h>
int main(){
  int num,i,f,r,sum=0,temp;
  printf("\nEnter a number");
  scanf("%d",&num);
  temp=num;
  while(num){
      i=1,f=1;
      r=num%10;
      while(i<=r){
      f=f*i;
          i++;
      }
      sum=sum+f;
      num=num/10;
  }
  if(sum==temp)
      printf("%d is a strong number",temp);
  else
      printf("%d is not a strong number",temp);
  return 0;
}

Definition of strong number:

A number is called strong number if sum of the factorial of its digit is equal to number itself. For example: 145 since
1! + 4! + 5! = 1 + 24 + 120 = 145

(E) Check the given number is armstrong number or not using c program

#include<stdio.h>
int main(){
int num,r,sum=0,temp;
printf("\nEnter a number:-");
scanf("%d",&num);
temp=num;
while(num!=0){
r=num%10;
num=num/10;
sum=sum+(r*r*r);
}
if(sum==temp)
printf("\nThe number %d is an armstrong number",temp);
else
printf("\nThe number %d is not an armstrong number",temp);
return 0;
}

Definition of Armstrong number:

Definition for c programming point of view:
Those numbers which sum of the cube of its digits is equal to that number are known as Armstrong numbers. For example 153 since 1^3 + 5^3 + 3^3 = 1+ 125 + 9 =153
Other Armstrong numbers: 370,371,407 etc.
In general definition:
Those numbers which sum of its digits to power of number of its digits is equal to that number are known as Armstrong numbers.
Example 1: 153
Total digits in 153 is 3
And 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
Example 2: 1634
Total digits in 1634 is 4
And 1^4 + 6^4 + 3^4 +4^4 = 1 + 1296 + 81 + 64 =1634
Examples of Armstrong numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834, 1741725

(F) write the program for prime numbers?
Answer
# 1    

main()
{
int i,j=2,ch=0;
clrscr();
       printf("\nENTER ANY NUMBER");
       scanf("%d",&i);
  while(j<=i/2)
       {
        if(i%j==0)
          {
            printf("%d IS NOT PRIME",i);
            ch=1;
            break;
          }
        else
          {
           j++;
          }
      }
 if(ch==0)
   {
   printf("%d IS PRIME",i);
   }
}

(G) TO FIND FACTORIAL OF A NUMBER USING C PROGRAM

#include<stdio.h>
int main(){
  int i=1,f=1,num;
  printf("\nEnter a number:");
  scanf("%d",&num);
  while(i<=num){
      f=f*i;
      i++;
  }
  printf("\nFactorial of %d is:%d",num,f);
  return 0;
}

Tuesday 16 August 2011

JAVA 7 Features

Virtul Machine

JSR 292: Support for dynamically-typed languages (InvokeDynamic)

VM and language extensions to support the implementation of dynamically-typed languages at performance levels near to that of the Java language itself

Strict class-file checking [NEW]
Per the Java SE 6 specification, class files of version 51 (SE 7) or later must be verified with the typechecking verifier introduced by JSR 202 in Java SE 6; the VM must not fail over to the old inferencing verifier

Language

JSR 334: Small language enhancements (Project Coin)

A set of small language changes intended to simplify common, day-to-day programming tasks:

1.      Strings in switch statements
2.      Automatic resource management
3.      Improved type inference for generic instance creation ("diamond")
4.      Simplified varargs method invocation,
5.      Better integral literals,
6.       Improved exception handling (multi-catch)

Core

Upgrade class-loader architecture

Modifications to the ClassLoader API and implementation to avoid deadlocks in non-hierarchical class-loader topologies

Method to close a URLClassLoader

A method that frees the underlying resources, such as open files, held by a URLClassLoader

Concurrency and collections updates (jsr166y)

A lightweight fork/join framework, flexible and reusable synchronization barriers, transfer queues, a concurrent-reference HashMap, and thread-local pseudo-random number generators

Internationalization

Unicode 6.0

Upgrade the supported version of Unicode to 6.0

Locale enhancement

Upgrade the java.util.Locale class to support IETF BCP 47 and UTR 35 (CLDR/LDML)

Separate user locale and user-interface locale

Upgrade the handling of locales to separate formatting locales from user-interface language locales, as is done on Vista and later versions of Windows

I/O and Networking

JSR 203: More new I/O APIs for the Java platform (NIO.2)

New APIs for filesystem access, scalable asynchronous I/O operations, socket-channel binding and configuration, and multicast datagrams

NIO.2 filesystem provider for zip/jar archives

A fully-functional and supported NIO.2 filesystem provider for zip and jar files

SCTP (Stream Control Transmission Protocol)

An implementation-specific API for the Stream Control Transmission Protocol on Solaris

SDP (Sockets Direct Protocol)

Implementation-specific support for reliable, high-performance network streams over Infiniband connections on Solaris and Linux

Use the Windows Vista IPv6 stack

Upgrade the networking code to use the Windows Vista IPv6 stack, when available, in preference to the legacy Windows stack

TLS 1.2

Add support for TLS 1.2, which was standardized in 2008 as RFC 5246

Security & Cryptography

Elliptic-curve cryptography (ECC)

A portable implementation of the standard Elliptic Curve Cryptographic (ECC) algorithms, so that all Java applications can use ECC out-of-the-box

JDBC

JDBC 4.1

Upgrade to JDBC 4.1 and Rowset 1.1

Client

XRender pipeline for Java 2D

A new Java2D graphics pipeline based upon the X11 XRender extension, which provides access to much of the functionality of modern GPUs

Create new platform APIs for 6u10 graphics features

Create new platform APIs for features originally implemented in the 6u10 release: Translucent and shaped windows, heavyweight/lightweight mixing, and the improved AWT security warning

Nimbus look-and-feel for Swing

A next-generation cross-platform look-and-feel for Swing

Swing JLayer component

Add the SwingLabs JXLayer component decorator to the platform

Web

Update the XML stack

Upgrade the JAXP, JAXB, and JAX-WS APIs to the most recent stable versions

Management

Enhanced JMX Agent and MBeans [NEW]

An implementation-specific enhanced JMX management agent, ported from JRockit, which makes it easier to connect to the platform MBean server through firewalls, together with a richer set of MBeans which expose additional information about the internal operation of the VM

Deferred to JDK 8 or later

JSR 294: Language and VM support for modular programming

Enhancements to the Java language and virtual-machine specifications to support modular programming, at both compile time and run time

JSR 308: Annotations on Java types

An extension to the Java annotation syntax to permit annotations on any occurrence of a type

JSR TBD: Language support for collections

Literal expressions for immutable lists, sets, and maps, and indexing-access syntax for lists and maps

JSR TBD: Project Lambda

Lambda expressions (informally, "closures") and defender methods for the Java programming language

Modularization (Project Jigsaw)

A simple, low-level module system focused upon the goal of modularizing the JDK, and the application of that system to the JDK itself

JSR 296: Swing application framework

An API to define the basic structure of a typical Swing application, thereby eliminating lots of boilerplate code and providing a much-improved initial developer experience

Swing JDatePicker component

Add the SwingLabs JXDatePicker component to the platform

Courtesy:http://sharad-java-j2ee-interview-questions.blogspot.com/search/label/Core%20Java

Java SE 7 Features and Enhancements

Highlights of Technology Changes in Java SE 7

The following list contains links to the the enhancements pages in the Java SE 7 guides documentation. Choose a technology for further information.

What is difference between Unchecked and Checked Exceptions? and What is difference between Synchronized method and Synchronized block?

What is difference between Unchecked and Checked Exceptions?

Unchecked exceptions :
  • represent defects in the program (bugs) - often invalid arguments passed to a non-private method. To quote from The Java Programming Language, by Gosling, Arnold, and Holmes : "Unchecked runtime exceptions represent conditions that, generally speaking, reflect errors in your program's logic and cannot be reasonably recovered from at run time."
  • are subclasses of RuntimeException, and are usually implemented using IllegalArgumentException, NullPointerException, or IllegalStateException
  • a method is not obliged to establish a policy for the unchecked exceptions thrown by its implementation (and they almost always do not do so)
Checked exceptions :
  • represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files)
  • are subclasses of Exception
  • a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow)

What is difference between Synchronized method and Synchronized block?

What is difference between Synchronized method and Synchronized block?


The key difference is this: if you declare a method to be synchronized, then the entire body of the method becomes synchronized; if you use the synchronized block, however, then you can surround just the "critical section" of the method in the synchronized block, while leaving the rest of the method out of the block.
If the entire method is part of the critical section, then there effectively is no difference. If that is not the case, then you should use a synchronized block around just the critical section. The more statements you have in a synchronized block, the less overall parallelism you get, so you want to keep those to the minimum.

What is difference between ArrayList and Vector ?

  1. The Vector class is synchronized, the ArrayList is not.
  2. ArrayList is fast than the Vector.

JDK 5 Enhancements in Java Language

JDK 5 Enhancements in Java Language


1.      Generics - This is an enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting.
e.g.
Previously
Array List numbers = new ArrayList();

Now in JDK 5.0
Array List<Integer> numbers = new ArrayList<Integer> ();

2.      Enhanced for Loop - This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.
e.g.      
Previously
Iterator itr = numbers.iterator();
while
 (itr.hasNext()) 
{
      Integer element = (Integer)itr.next();
      System.out.println (number);
}

Now in JDK 5.0
for (Integer number: numbers)
{
            System.out.println (number);
}

3.      Autoboxing/Unboxing - This facility eliminates the drudgery of manual conversion between primitive types (such as int, long) and wrapper types (such as Integer, Long).
e.g.      
int number = 1;
Previously
Integer number2 = (Integer) number;

Now in JDK 5.0
Integer number2 = number;

4.      Typesafe Enums - This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern ("Effective Java," Item 21) without the verbosity and the error-proneness.
e.g.
Previously
public static final int SEASON_WINTER = 0;
public static final int SEASON_SPRING = 1;
public static final int SEASON_SUMMER = 2;
public static final int SEASON_FALL   = 3;

Now in JDK 5.0
enum Season {WINTER, SPRING, SUMMER, FALL}

5.      Varargs - This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists.
e.g.
Previously
Object[] arguments = {
    new Integer(7),
    new Date(),
    "a disturbance in the Force"
};

String result = MessageFormat.forma("At {1,time} on {1,date}, there was {2} on planet "
     + "{0,number,integer}.", arguments);

Now in JDK 5.0
Using Varargs no need to create object array separately, we can give arguments directy.

String result = MessageFormat.format("At {1,time} on {1,date}, there was {2} on planet "
    + "{0,number,integer}.",
    7, new Date(), "a disturbance in the Force");

6.      Static Import - This facility lets you avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern."
e.g.
Previously
double r = Math.cos(Math.PI * theta);

Now in JDK 5.0
import static java.lang.Math.*;
Once the static members have been imported, they may be used without qualification or class names:
double r = cos(PI * theta);

7.      Annotations (Metadata) - This language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it. Also it eliminates the need for maintaining "side files" that must be kept up to date with changes in source files. Instead the information can be maintained in the source file.
Now in JDK 5.0
public @ interface Test{}

What is difference between HashMap and HashTable and HashSet and TreeSet?

Hashtable
Hashtable is basically a data structure to retain values of key-value pair

  •  It didn’t allow null for both key and value. You will get NullPointerException if you add null value.
  • It is synchronized. So it comes with its cost. Only one thread can access in one time. So It is slow.
HashMap
Like Hashtable it also accepts key value pair.
  • It allows null for both key and value. 
  • It is unsynchronized. So come up with better performance(fast)

HashSet
It is from Set family.
  • HashSet does not allow duplicate values. 
  • It provides add method rather put method. 
  • You also use its contains method to check whether the object is already available in HashSet. 
  • HashSet can be used where you want to maintain a unique set but not the order. 


TreeSet
 It is also from Set family.
  • Likely HashSet, TreeSet does not allow duplicate values.
  • It provides add method rather put method. 
  • You also use its contains method to check whether the object is already available in TreeSet. 
  • TreeSet can be used where you want to maintain a unique set as well as the order.

OOPs concepts in JAVA

OOPs concepts in JAVA

  • Abstraction: Hides certain details and only show the essential features of the object.
  • Encapsulation: The internal representation of an object is generally hidden from view outside of the object's definition.
  • Inheritance: Defines relationships among classes in an object-oriented language.  
  • Polymorphism: Define more than one method with the same name.

What is difference between Overloading and Overriding?

Overloading: The methods with the same name but it differs by types of arguments and number of arguments.

Overriding:  The methods with the same name and same number of arguments and types but one is in base class and second is in derived class.

 
Encapsulation in JAVA

Encapsulation in java means declare instance variables of class as private and access that instance variables using public methods.
Following is the example which shows that Person class having name and age are private instance variables and those are accessed by public getter and setter methods.

public class Person {
    private String name;
    private int age;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}

Difference between abstract class and interface

What is an Abstract Class?

  1. An abstract class is a special kind of class that cannot be instantiated.So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.
  2.  A class may inherit only one abstract class.
  3. An abstract class can contain access modifiers for the subs, functions, properties
  4. Fast
  5. An abstract class can have fields and constants defined

What is an Interface?

  1. An interface is not a class. It is an entity that is defined by the word Interface. An interface has no implementation; it only has the signature or in other words, just the definition of the methods without the body. As one of the similarities to Abstract class, it is a contract that is used to define hierarchies for all subclasses or it defines specific set of methods and their arguments. The main difference between them is that a class can implement more than one interface but can only inherit from one abstract class.
  2. A class may inherit several interfaces.
  3. An interface cannot have access modifiers for the subs, functions, properties etc everything is assumed as public
  4. Requires more time to find the actual method in the corresponding classes.
  5. No fields can be defined in interfaces


Difference between JDK 1.0 TO JDK 1.6

Difference between JDK1.4.2, JDK 1.5.0 and JDK1.6
JDK 1.0 (january 23, 1996) oak
- Initial release


JDK 1.1 (february 19, 1997)
- Retooling of the AWT event model
- Inner classes added to the language
- JavaBeans
- JDBC
- RMI


J2SE 1.2 (December 8, 1998) playground
This and subsequent releases through J2SE 5.0 were rebranded retrospectively Java 2 & version name "J2SE"
(Java 2 platform, Standard edition) replaced JDK to distinguish the base platform from
J2EE (java 2 platform, enterprise edition) and J2ME (java 2 platform, micro edition).

- Strictfp keyword
- Reflection
- Swing api integration into the core classes
- JVM equipped with a jit compiler
- Java plug-in
- Java IDL
- An IDL implementation for corba interoperability
- Collections Framework


J2SE 1.3 (may 8, 2000) kestrel
- Hotspot jvm included
- JavaSound
- JNDI included in core libraries
- Java platform debugger architecture (jpda)
- RMI was modified to support optional compatibility with corba


J2SE 1.4 (february 6, 2002) merlin
- assert keyword
- Regular expressions
- Exception chaining (allows an exception to encapsulate original lower-level exception)
- Internet protocol version 6 (IPV6) support
- Non-blocking nio (new input/output)
- Logging API
- Image i/o api for reading and writing images in formats like jpeg and png
- Integrated XML parser and XSLT processor (JAXP)
- Integrated security and cryptography extensions (JCE, JSSE, JAAS)
- Java web start


J2SE 5.0 (september 30, 2004) tiger [originally numbered 1.5]
- Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion).
- Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities.
- Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as integer).
- Enumerations: the enum keyword creates a typesafe, ordered list of values (such as day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
- Swing: new skinnable look and feel, called synth.
- Var args: the last parameter of a method can now be declared using a type name followed by three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method, or alternatively the calling code can pass an array of that type.
- Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over each member of either an array or any iterable, such as the standard collection classesfix the previously broken semantics of the java memory model, which defines how threads interact through memory.
- Automatic stub generation for rmi objects.
- Static imports concurrency utilities in package java.util.concurrent.
- Scanner class for parsing data from various input streams and buffers.
- Assertions
- StringBuilder class (in java.lang package)
- Annotations



Java SE 6 (december 11, 2006) mustang
sun replaced the name "J2SE" with java se and dropped the ".0" from the version number.
Beta versions were released in february and june 2006, leading up to a final release that occurred on december 11, 2006.
The current revision is update 14 which was released in may 2009.

- Support for older win9x versions dropped.
- Scripting lang support: Generic API for integration with scripting languages, & built-in mozilla javascript rhino integration
- Dramatic performance improvements for the core platform, and swing.
- Improved web service support through JAX-WS JDBC 4.0 support
- Java compiler API: an API allowing a java program to select and invoke a java compiler programmatically.
- Upgrade of JAXB to version 2.0: including integration of a stax parser.
- Support for pluggable annotations
- Many GUI improvements, such as integration of swingworker in the API, table sorting and filtering, and true swing double-buffering (eliminating the gray-area effect).


Java se 6 update 10
A major enhancement in terms of end-user usability.
- Java Deployment Toolkit, a set of javascript functions to ease the deployment of applets and java web start applications.
- Java Kernel, a small installer including only the most commonly used jre classes. Enhanced updater.
- Enhanced versioning and pack200 support: server-side support is no longer required.
- Java quick starter, to improve cold start-up time.
- Improved performance of java2D graphics primitives on windows, using direct3D and hardware acceleration.
- A new Swing look and feel called NIMBUS and based on synth.
- Next-generation java plug-in: applets now run in a separate process and support many features of web start applications.


Java se 6 update 12
This release includes the highly anticipated 64-bit java plug-in (for 64-bit browsers only), windows server 2008 support,
and performance improvements of java and JAVAFX applications.




Features and Enhancements JDK Documentation


Java Platform, Standard Edition 6 is a major feature release. The following list highlights many of the significant features and enhancements in Java SE 6 since the prior major release, J2SE 5.0. It is followed by a detailed table with links to related bugs, enhancements, and JSRs.


Note, this web page relates to the Release Candidate milestone for Java SE 6. Its related Umbrella JSR 270 does not itself define specific features. Instead it enumerates features defined in other JSRs or through the concurrent maintenance review of the Java SE platform specification. The final release is expected to include all JSR 270 features, although it is possible for an approved feature to be dropped.

Refer also to:
Java Platform, Standard Edition Differences between 5.0 fcs and 6 Beta .


Highlights of Technology Changes in Java SE 6


Choose a technology for links to further information.
Collections Framework
Deployment (Java Web Start and Java Plug-in)
Drag and Drop
Instrumentation
Internationalization Support
I/O Support
JAR (Java Archive Files) - An annotated list of changes between the 5.0 and 6.0 releases to APIs, the jar command, and the jar/zip implementation.
Java Web Start
Java DB 10.2 JDBC4 Early Access

The $JAVA_HOME/db subdirectory contains class libraries for Java DB, Sun Microsystems's distribution of the Apache Derby database technology.
For information on Java DB, see Java DB.
For information on Derby, see: Apache Derby.
For documentation on this version of Java DB, see Java DB - Reference.
For a description of the capabilities of this version of Java DB, see the release notes in the $JAVA_HOME/db subdirectory.
This Early Access version of Java DB is built from Apache Derby 10.2.1.7 source code (revision 453926) using JDK 6 JDBC 4 APIs to build JDBC 4 driver code.
Comments regarding this version of Java DB can be sent to javadb-ea@sun.com.

DISCLAIMER: THIS IS EARLY ACCESS SOFTWARE AND COMES WITH NO WARRANTIES OR SUPPORT. IT IS PROVIDED "AS IS". IT IS NOT FOR PRODUCTION USE.

JMX (Java Management Extensions) - A list of JMX API changes between the J2SE 5.0 and Java SE 6 releases.
JPDA (Java Platform Debugger Architecture)
JVM TI (Java Virtual Machine Tool Interface)
lang and util Packages
Monitoring and Management for the Java Platform
JConsole is Officially Supported in Java SE 6
Networking Features
Performance
Reflection
RMI (Remote Method Invocation)
Scripting
Security
Serialization of Objects
Swing
VM (Java Virtual Machine)

Detailed Table of Technology Changes in Java SE 6


Items are ordered by area/component. The first column indicates the scope of a change:

jsr – A larger feature or feature set having its own Java Specification Request
api – A smaller feature that adds new Java APIs (application programming interfaces)
imp – An implementation enhancement that does not involve new APIs, for example, a performance improvement

Java 1.5 features

Many changes will happen in Jdk 1.5, simple Enhancements will happen in jdk 1.6 like deque related class in java.
Java 1.5 features
--------------------
1.Enhanced for loop(for each for loop).
2.Enumeration( enum keyword)
3.Assertions added in java 1.5
4.AutoBoxing/Unboxing ( like wrapper classes . means automatic convert between primitive to String and vice-versa.)
5.Generics ( example: typed Collections, Set(<String>))
6.Varagrs (variable arguments) (example : for printf() function,allows variable number of different arguments)
7.StringBuilder class in jdk 1.5 (java.lang package)
8.Annotations.

Complete Details about eLitmus pH Test at Rs:699/- Share your java material and fresher interview Information for us to Help Others... mail to : vhkrishnan.v@gmail.com