when to use ArrayList and when to use HashMap in
webApplication.
46
Say you want to store the information about a number of
pets in an array. Typical
information that you could store for each pet (where
relevant) would be
• Breed of animal
• Animal's name
• Its birth date
• Its sex
• Whether it has been sterilised or not
• When it is due for its next inoculation
• When it last had its wings clipped
For each type of pet (eg. dog, cat or bird) you would
typically define a class to hold
the relevant data.
Note: You do not need to implement these classes. Just
answer the following
questions.
3.1.1 What would be the advantage of creating a superclass
(eg. Pet) and
declaring an array of Pet objects over simply using an
array of Objects,
storing each of the instances of the different pet classes
(eg. Dog, Cat or
Bird) in it?
3.1.2 Would you define Pet as a class or as an interface?
Why?
(2)
(2)
Write a java program to find the route that connects
between Red and Green Cells.
General Rules for traversal
1. You can traverse from one cell to another
vertically, horizontally or diagonally.
2. You cannot traverse through Black cells.
3. There should be only one Red and Green cell and at
least one of each should be present. Otherwise the array is
invalid.
4. You cannot revisit a cell that you have already
traversed.
5. The maze need not be in the same as given in the
above example
152
Hai friends I am MCA 2006 passout. Spend time in 1 yr for
teacing and 5 months in small s/w firm. worked in 4 or 5
months in few places. Presently I am writing bank exams. I
want to get back to IT sector. Are there any possibilities.
any growth prospects?. I am having some knowledge in core
and advanced java. I am so desperate. Any suggestions thanks
in advance. u can write to my mail mahidestiny@gmail.com
40
hi am an engineering student and my next plan is for ms in
either in us or australia i got my passport but i dont know
anything bout visa can u give brief idea
1)How to get prepared for visa and
2)How to apply for top universities and
3)How to pay the fee and so on
These all are basic questions plz give me a clear idea
75
How to implement a multithreaded applet?
325
23. Storage space in java is of the form
Stack
Queue
Heap
List
24. What is java code embedded in a web page known as
Applets
Servlets
scriptlets
snippets
25. Which of the following attributes are compulsory with
an <applet> tag?.
code,height & width.
26. What does 'CODEBASE' in an applet tag specify?.
Files absolute path.
My application URL :
http://localhost:8080/Application/Login.jsp. When a user
enter this url in IE then, how it get Login.JSP Page
exactly? what are the processes will happen from when we
submit the URL to get Login.jsp?