• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java classes

 
dessie ramnath
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Past year paper(Multichoice question)
Q4.Consider tha class classA , abstrcat class classB, and final class classC have been defined.Which one of the following is correct?

A. classA extends classC implements classB
B. classA extends classB, classC
C. classA extends classB
D. classB implements classC

Please explain your answer
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.

What do you think the answer is? Please explain your answer.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While you're explaining things, explain why the question isn't nonsensical, because I don't get it.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49793
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is a class header line and the question means "which of these will actually compile?" Which makes it a very simple question, actually.

And welcome to JavaRanch
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, that makes sense... *whew* All I could think of was "well wouldn't that depend on the code?"
 
karimkhan pathan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no one answered the question !!!
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
karimkhan pathan wrote:no one answered the question !!!


because all of them are *really* helping the Original poster and the followers to think and come up with their own possible answers
 
salvin francis
Bartender
Posts: 1306
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me answer the Question ....




Naa, here is a Hint:

What can you NOT do with a Final class ??


Hope i have not made it too easy
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
salvin francis wrote:Let me answer the Question ....
What can you NOT do with a Final class ??


where is *final* coming into picture now?
 
Rob Spoor
Sheriff
Pie
Posts: 20609
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dessie ramnath wrote:and final class classC
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. I was looking at the 4 options mainly!
 
salvin francis
Bartender
Posts: 1306
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic