Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

abstract class

 
vidu sri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a public abstract class in a separate package.
A class in default package has to extend it.And object is
created for the sub class.The main is found in default package.
but i get error.



 
Campbell Ritchie
Sheriff
Posts: 48404
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what error are you getting?
 
Ulises Pulido
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe an stack overflow error.

# public void selection()
# {
# selection();
# System.out.println("join on dec 21");
# }

if you want to use the selection method of the parent class use super.selection();
 
vidu sri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after running,i got as at computer.selection(general.java:6)
After changing selection(); as super.selection(); , i got the output.
THANKS A LOT
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic