• Post Reply Bookmark Topic Watch Topic
  • New Topic

inheritance question  RSS feed

 
kanaka tam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,
I know the question that i am going to ask is petty but just wanted to be ready before the test. The following is one of the practice test questions that my teacher gave. I have figured the answer but just wanted to make sure. The question is
What classes contain the original declaration for the following methods used when the JApplet class is extended:
1. init()
2. paint()
3. repaint()

My first answer to this was Graphics class then i realized JApplet so it should be swings class.
Not sure of my answer. Also, i was just introduced to applications from applets.
Thank you,
Kanaka
kt
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have figured the answer but just wanted to make sure

i'll never forget about an advice i was given:
API is your best friend (second best if you'r pair programming - J Langr added )

anyway, if you open API, click on Index and navigate to each entry you gave, there you'll have the solution:
init() - Method in class java.applet.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case you don't know about the Java API docs, check them out here. Our FAQ contains a short description about how to navigate them. You can easily use them to look up the answers to this and many other common questions about the classes available in the Standard API.

Layne
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!