• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing inputstream to a sub class?

 
Brian Ngo
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have 6 classes that extends a abstract class, if i want user to input data in my main class using InputStreamReader.


How can i pass the String? Is it possible?
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand you correctly the code you have shown us is in a super class and you want to pass the string myString to a method in the subclass. Simple. You declare an abstract method in your super class that takes a String as an argument and you implement that method in the subclass.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!