U could use patten Multiton (like Singleton, but 4 more than 1 obj).but Y? what if later u want 2 model two teams? Or 3 teams? U have 2 modifiy da Multiton each time!!this logic sould be part of Team, so its addPlayer method throws a TooManyPlayerzException if u add more than 11 players!
Sometimes, we may not know until run time precisely how large of an array we need. At that situation, the collections framework defines arrayList.ArrayList is a variable length array of object referen...
siva kumar reddy
Aug 10th, 2006
hi,these all collection objects are used to store the objects.arraylist is used to random access.linked list is maintains the order.but these are not thread safe.vector is a synchronised.it is used in...
Final, it can be used in 3 ways,1. Variable declared as final, its contents cannot be changed. It value is constant through out the execution of the application2. Method declared as final, this method...
Hi,AJAx is asynchronous javascript XML. Simple to use1. create xmlhttprequest object2. before that check the browser type (eg various ways to create object for different browser)3. in javascript write...
Levey
May 11th, 2006
AJAX: Asynchronus Javascript and XML, is not a new technoly. It is compined with javascript,xml and html. Normally we do submit the page by click the HTML submit button, where we give the action to ha...
Hi ,apart from c++ ,java has dynamic feature . after creating . class file still scope to pass the imformation to that class .like java.lang.ObjectOutputStream using reflecton package.bye
Sunil Pratap Singh
Nov 8th, 2006
Objects have some attributes ,method and behaviour which determine their state. When the attributes and behaviour of the objects are determined at run time these objects are some times known...
only one thread is needed i.e main but main thread is not user thread it is deamon thread
anil patil
Oct 1st, 2006
Jvm run on single thread but it ll create more child thread depending up operating system. if u deeply go into jvm u can find function like classloader, import and packaging. which require threads to create.
A system thread is any thread not started and managed by an application. In a MIDP environment, system threads are created by the application management software (AMS) that controls MIDlet execution.
Dear Readers,To know when exactly static block gets loaded please see the example belowpublic class Test{static{//Do somthing}//do some declaration initalisation//Do some methods//Do some static ...
In the object oriented paradigm all the objects that you code exist as objects. In all object oriented languages we have arrays to store and send and retrieve. To store objects the similar way we have...
When an applet is first created, an applet stub is attached to it using the applet's setStub method. This stub serves as the interface between the applet and the browser environment or applet viewer e...
intalaash
Sep 28th, 2006
When an applet is first created, an applet stub is attached to it using the applet's setStub method. This stub serves as the interface between the applet and the browser environment or applet viewer e...
serialization is STORING an object somewhere, and ability to RESTORE it later with all it's state information.For example, when you define class as Serializable you mean that it's objects can be : a) ...
it is way of moving obj from 1 place to a new place. lke if u hav jvm on desktop nd servr machne with jvm on 2. u can "Serialization" obj so it can be sent frm dsktop to srver.it is vry like xml. but ...
Why not just treat infinty like any other String->float conversion error ? :float myfloat;try { myfloat = Float.parseFloat(floatAsString);} catch (Exception e) { // o-o the format of floatAsString is not quite compatible with java float}
Hi ,Finally i got the answer, but thank u all to give me prompt reply.i am using jdk1.4 . thats why i cant use Float.isInfinity() but i'll remember so in future i can use.thank u again.
You can integrate small modules BY putting them into one package, or if they're in separate packages already - you just simply put them into project's JAR
kalpana
Jul 24th, 2006
The best option will be make to separate packages ,store each module in each package and then import either in another
Stream Reader A Stream Reader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding. The encoding that it u...
Is it advantage for the hashmap since it is not synchronizedif so explain with an example where it is usefuland where we cannot use hashtable
md manzoor murshed
Aug 11th, 2006
Consider a situation when you need to call a method of some other application and assume that you don't have the source file access of that application...How you make make the method synchronized??? In this situation you can make the caller statement a synchronized statement..ThanksManzoor
Transient indicates that when the object is serialised ignore this variable.. and when variable is initialised to its default value when object is deserialised
Up to my understanding transient variables not stored anywhere you can?t store them. I think you meant to say where the memory will be allocated?In that case I think its heap correct me if I am wrong.
Java is case sensitive.if you change main to Main program will compile.while running using java in command prompt its shows errorException in thread "main" java.lang.NoSuchMethodError: mainmain() is a...
Main() and Main() are two different methods in Java. But if u write Main() instead of main() then there will no exception at the compile time. But It will generate a runtime exception : java.lang.NoSuchMethodError: main
Since Vector and Array List both are dynamically growable objects whereas Array is basically having fixed size. thats why we can add or delete any no of to Vector or ArrayList.
Ans