[AbstractClass] b1; This is just making a referance of the abstract class.There is no wrong in it. b1=new [AbstractClass] ; This statement initialises the Abstract class which is not permitted for it. But suppose a class extends this class and overrides all its method(concrete class)the an abstract class can be to referance the sub class by the property of dynamic bynding.
compilation error in the program may be due to the following 1.not importing the io package. 2.not trying to catch an exception. it is always preferable to do the stream operations with exception handling.
== is used to check the equality relation of premitive data types.like int,char,float etc. .equals()is used to check the comparison of derived objects. String can use both == and .equals(),but not in all casses.
A RMI program works fine with an applet in the client side in appletviewer.But when working with a IE browser directly it doesn't work.why? When working with an Netscape browser through a webserver it works,but fails when working the same with IE.why?
Ur suggestion that "heavy weight components r developed in native os",but i think all the java packages r written in java itself.only the jvm(interpreter) is written in c++.
The solution seems to be good. But what i would think better would be to take the number as a String.use the String.charAt(i) eg: String s=t1.getText(); int sum=0; for(int i=0;i<s.length(;i++)> { sum+=Integer.parseInt(s.charAt(i)); } t2.setString(Integer.toString(sum));