Hi.. native can be applied only to a method whereas transient can be applied only to a variable. The native concept comes into a picture when you want to access any class(methods or variables) which may be written in a language other than java for example,using a method written in C in a Java program. The transient concept comes into picture when u discuss about serialisation which refers to saving the state of a object in the form of a sequence of bytes.By default no object can be serialised but when ur class implements Serializable interface ,u can save the state of that object at anytime required. But suppose there is a variable for ex, int a and i dont want this variable to be included in the state of the serialized object,the i shall describe this variable as transient int a=20; i hope this works out..
There's a way to do it better - find it. -Edison. A better tiny ad: