Click here to Skip to main content
14,733,682 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
PIEBALDconsult22-May-19 10:16
professionalPIEBALDconsult22-May-19 10:16 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 10:31
MemberDean Roddey22-May-19 10:31 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
#realJSOP22-May-19 10:14
mva#realJSOP22-May-19 10:14 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 10:18
MemberDavid A. Gray22-May-19 10:18 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 10:56
sysadminMatthew Dennis22-May-19 10:56 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 10:52
MemberDean Roddey22-May-19 10:52 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
User 483504722-May-19 10:47
MemberUser 483504722-May-19 10:47 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 11:00
MemberDavid A. Gray22-May-19 11: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
User 483504722-May-19 11:25
MemberUser 483504722-May-19 11:25 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 12:19
MemberDavid A. Gray22-May-19 12:19 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 11:02
sysadminMatthew Dennis22-May-19 11:02 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Jammer22-May-19 13:30
MemberJammer22-May-19 13:30 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
jsc4222-May-19 23:09
professionaljsc4222-May-19 23:09 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray23-May-19 7:36
MemberDavid A. Gray23-May-19 7:36 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
DerekT-P23-May-19 1:22
professionalDerekT-P23-May-19 1:22 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 2:38
MemberGary Wheeler23-May-19 2:38 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
User 483504723-May-19 6:37
MemberUser 483504723-May-19 6:37 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 6:48
MemberGary Wheeler23-May-19 6:48 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray23-May-19 7:32
MemberDavid A. Gray23-May-19 7:32 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 9:10
MemberGary Wheeler23-May-19 9:10 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
jsc4225-May-19 9:29
professionaljsc4225-May-19 9:29 
GeneralThought of the Day Pin
OriginalGriff22-May-19 5:56
mveOriginalGriff22-May-19 5:56 
GeneralRe: Thought of the Day Pin
W Balboos, GHB22-May-19 6:10
mveW Balboos, GHB22-May-19 6:10 
GeneralRe: Thought of the Day Pin
megaadam22-May-19 6:11
professionalmegaadam22-May-19 6:11 
GeneralRe: Thought of the Day Pin
Nagy Vilmos22-May-19 6:15
professionalNagy Vilmos22-May-19 6: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.