Click here to Skip to main content
14,218,541 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
PIEBALDconsult22-May-19 9:16
protectorPIEBALDconsult22-May-19 9:16 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 9:31
memberDean Roddey22-May-19 9:31 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
#realJSOP22-May-19 9:14
mve#realJSOP22-May-19 9:14 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 9:18
groupDavid A. Gray22-May-19 9:18 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 9:56
adminMatthew Dennis22-May-19 9:56 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 9:52
memberDean Roddey22-May-19 9:52 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Urban Cricket22-May-19 9:47
memberUrban Cricket22-May-19 9:47 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 10:00
groupDavid A. Gray22-May-19 10:00 
Quote:
I like it. Implement only the methods you really need and not bother about the rest. In Java I have listener interfaces with tons of methods that I will never need but have to put some empty stub code because I have to.


Am I missing something, or are you stuck with some badly designed Java classes? IMO, for the most part, an abstract class should provide a default implementation of every method, perhaps marked as virtual. With that being said, I have one abstract class of my own devising that has one abstract method on it, which must, of course, be implemented by every heir. Since the method takes an enumerated type as its argument, and its work requires evaluating that enumeration by way of a switch block, the base class cannot implement it.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting

GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Urban Cricket22-May-19 10:25
memberUrban Cricket22-May-19 10:25 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 11:19
groupDavid A. Gray22-May-19 11:19 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 10:02
adminMatthew Dennis22-May-19 10:02 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Jammer22-May-19 12:30
memberJammer22-May-19 12:30 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
jsc4222-May-19 22:09
professionaljsc4222-May-19 22:09 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray23-May-19 6:36
groupDavid A. Gray23-May-19 6:36 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
DerekTP12323-May-19 0:22
professionalDerekTP12323-May-19 0:22 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 1:38
memberGary Wheeler23-May-19 1:38 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Urban Cricket23-May-19 5:37
memberUrban Cricket23-May-19 5:37 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 5:48
memberGary Wheeler23-May-19 5:48 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray23-May-19 6:32
groupDavid A. Gray23-May-19 6:32 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 8:10
memberGary Wheeler23-May-19 8:10 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
jsc4225-May-19 8:29
professionaljsc4225-May-19 8:29 
GeneralThought of the Day Pin
OriginalGriff22-May-19 4:56
protectorOriginalGriff22-May-19 4:56 
GeneralRe: Thought of the Day Pin
W Balboos22-May-19 5:10
mveW Balboos22-May-19 5:10 
GeneralRe: Thought of the Day Pin
megaadam22-May-19 5:11
professionalmegaadam22-May-19 5:11 
GeneralRe: Thought of the Day Pin
Nagy Vilmos22-May-19 5:15
professionalNagy Vilmos22-May-19 5:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.