SIVAKUMAR.J wrote:

> Im [sic] developing android [sic] application.My sdk details are *minimum 
> sdk version is 7 and target and buid sdk version is 10
> *
>
> In my app in one screen im using *"EditText"* and im using *filter* for 
> that editText
> the following are my coding snippet
>
> editText.setFilters
>         (
>                 new InputFilter[] 
>                 {
>                         new InputFilter() 
>                         {
>                             public CharSequence filter(CharSequence *src*, 
> int start,int end, Spanned dst, int dstart, int dend) 
>                             {
>
>                                 String name=src.getClass().getName();
>                                 System.out.println("\n\tSrc class name 
> ="+name);
>
>                                 String tempStr=((String)src).toUpperCase();
>
>
>
>                                 return tempStr;
>                             }                           
>                         }
>                 }
>         );
>
> in the above code sometimes *src* be the *String,sometimes it be 
> CharSequence,sometimes it be " android.text.SpannableStringBuilder"*
> my doubt is at what scenarios charsequence [sic - do not misspell types!] 
> is passed ,String is passed ,android.text.SpannableStringBuilder is passed 
> as *src*
> * <http://stackoverflow.com/users/385138/sivakumar-j>*


Read the Java Tutorials and study up on polymorphism and subtyping.

This is a very basic Java and object-oriented-programming (OOP) question.

The run-time type of an object is known to itself always. The formal, or 
compile-time type 
is known at compile time (hence the name "compile-time type") and is a 
supertype of the 
run-time type.

Anything of the correct type may be passed as a method argument. 

The different scenarios are determined by what is passed into the method 
call.

You really need to study some tutorials. There is a minimum knowledge of 
Java and OOP 
necessary to program for Android.

-- 
Lew

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to