Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why is "c"?

 
pony
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What tags are mandatory when creating HTML to display an applet
Select most appropriate answer.

a) name, height, width
b) code, name
c) codebase, height, width
d) code, height, width
e) None of the above
the answer is c),
why is not d)?
 
Golam Newaz
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If i got this question first i would say that answer is d.
Actually, i think answer is c. Look
By default, a browser looks for an applet's class and archive files in the same directory as the HTML file that has the < APPLET > tag. [spaces inserted by Mapraputa to force browsers to diplay HTML rather than interpret it](If the applet's class is in a package, then the browser uses the package name to construct a directory path underneath the HTML file's directory.) Sometimes, however, it's useful to put the applet's files somewhere else. You can use the CODEBASE attribute to tell the browser in which directory the applet's files are located:
Normally when you run the file you keep your HTML and Class
File in the same directory. But if it is happened that only
your class file in the package and which is in the other
server then you have to use CODEBASE to find the class file.
Kindly find the details in this site:
http://java.sun.com/docs/books/tutorial/applet/appletsonly/html.html
-Golam Newaz
------------------
[This message has been edited by Mapraputa Is (edited February 15, 2001).]
 
Golam Newaz
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If i got this question first i would say that answer is d.
Actually, i think answer is c.
http://java.sun.com/docs/books/tutorial/applet/appletsonly/html.html
-Golam Newaz
------------------
 
Golam Newaz
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I do not know why it is getting problem to post the
message. I am giving it again. Kindly find the details
here:
http://www.java.sun.com/docs/books/tutorial/applet/appletsonly/html.html
-Golam Newaz
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I got this question on the Sun Certified Java Programmers exam I would know I had slipped through a knot hole in the space time fabric. The exam does not cover the topic of applets.
Marcus
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Golam, when you use HTML tags in your message they are interpreted, which is probably not your purpose . To prevent it you can ether put spaces, like < HTMLTag >, or use [], or just use HTMLTag without any "<" symbols. If you see that your message is corrupted, you can edit it and delete ill-behavio symbols.
Thanks for answering Pony's question!
Thanks to Marcus for explanation why you shouldn't answer Pony's question! Marcus, are you sure we are 100% protected from getting applet questions? I confirm that I did not get them on my exam. But it's better to know the answers, just in case.
[This message has been edited by Mapraputa Is (edited February 15, 2001).]
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Not that it matters anymore, but HTML 3.2 reference page shows the attributes CODE, WIDTH, and HEIGHT as required and all else as optional. This is also supported by the HTML 4.0 language reference.
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic