TARIT DASGUPTA

Greenhorn
+ Follow
since Nov 05, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by TARIT DASGUPTA

I am having a run-time exception
I have seen this sort of sample question -
What the output be?
System.out.println(5 + 3 * 4 / 2);
So in order to give answer to this sort of tricky question we have to memorise. Keep this plan for the previous 5 days of the exam.
Hi Serge,
Polymorphism means execution of differnt methods(with same name) depending on the signature of the method. The signature of a method depends on name, no. of parameter, type of parameters, order of parameters.
Unlike C++, in Java we can only have overloading by having differnt forms of the function in a class.
Over-riding is not at all polymorphism.
Ajith please put some light on this if I am wrong.
Thanks
Hi Hans
Why are you including a constructor in a class extending the Applet class. You don't instantiate an applet extended class. Aparna stated perfect that when an applet execution starts the browser looks for the init() method first instead of any constructor.
You cannot have a constructor in an class extending the Applet. Am I right Aparna?
Direct from source - "When a member function is declared as static it can be accessed before any object of that class is created and without any reference to any object."
This is because, when you declare a function as static, only one copy of the function is created in the buffer and all the object of that class has to access only that function. The objects don't have their own copy of function like in other cases.
Hope you understood.
Hi Sean
When you convert an int into a byte type narrowing conversion takes place without any loss of data. Further I somewhere read that conversion between primitive data types happens by implecit type casting i.e. the compiler does the casting for you.
Maha is right.
Constructors may have access specifiers but CONSTRUCTORS MUST NOT HAVE ANY RETURN TYPE. In class B, it is not a constructor but a general method with the name of the class itself.
Those data-objects whose reference counter is 0 are elegible for garbage collection.
Objects a, b, c after declaration are pointing at the allocated memory in the buffer(though they do not contain any value). Whereas object d is assigned to null i.e. d is not pointing to any memory location.
In my opinion only object d is eligible for garbage collection.

From the theoritical point of view I can say that -
The collection interface allow some methods as optional. This means, optional method contents can be modified. These methods are called MODIFIABLE. Those methods which can't be modified are termed as UNMODIFIABLE.
Direct from a source - IF AN ATTEMPT IS MADE TO USE ONE OF THESE MOTHODS ON AN UNMODIFABLE COLLETECTION, AN UnsupportedOperationalException IS THROWN.
Anyone can throw more light on this topic.
Can a CLASS-NAME and an OBJECT-NAME be same?
If yes then the code should compile without any errors.
When we call the start() method it actually updates the system environmental variables and instanciates some Thread class member data regarding the called thread and updates the job scheduler stack. Then it calls the run() method to make it into a runnable state. But, if the operating system does'nt support time slicing then it may happen that the called thread never gets a turn to execute and always get prempted by the threads of higher priority.
Anybody correct me if I am wrong.
Thanks
An Applet is a Java application that can be embedded in a HTML document which can be viewed by a browser. An applet can be of many use - graphical animations, user interface, games, etc.
An AppletContext is an interface containing a number of abstract functions that gives you the informations regarding the environment in which the applet is running.
If you get some detailed reference please let me know at [email protected]
24 years ago
Hi friends
I am trying to develop a horizontal text scroller applet whick will adjust the scrolling area depending on the applet dimension i.e. the scrolling should area should be at the middle of the applet region and from extreme right to extreme left, whatever the size may be.
Do any of you have a sample code? Please send it to [email protected] or [email protected]
Thanks
24 years ago
To develop a slide show applet, I need to know how to stop the flickering of the image. I hava tested by modifying the Update() method with Paint(g) statement, but it is not working.
Please let me know.
24 years ago