aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Applet" Watch "Applet" New topic
Author

Applet

rajani adapa
Ranch Hand

Joined: Jan 24, 2001
Posts: 54
import java.applet.Applet;
import java.awt.*;

public class Sample extends Applet {
private String text = "Hello World";
public void init() {
add(new Label(text));
}
public Sample (String string) {
text = string;
}
}

It is accessed form the following HTML page:

<html>
<title>Sample Applet</title>
<body>
<applet code="Sample.class" width=200 height=200></applet>
</body>
</html>

What is the answer to this question?
and tell me why?
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
what is the question exactly ? also your method must have a return type of Sample , and how can i attach example files ?


Val SCJP <BR>going for SCJD
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Rajani,
Read Carl's answer in this earlier post on the same subject.
Hope that helps.
------------------
Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Applet