Click here to Skip to main content
15,892,005 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 9:16
mvePIEBALDconsult22-May-19 9:16 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 9:31
Dean 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
David A. Gray22-May-19 9:18 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 9:56
sysadminMatthew Dennis22-May-19 9:56 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Dean Roddey22-May-19 9:52
Dean Roddey22-May-19 9:52 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
User 483504722-May-19 9:47
User 483504722-May-19 9:47 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 10:00
David 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
User 483504722-May-19 10:25
User 483504722-May-19 10:25 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray22-May-19 11:19
David A. Gray22-May-19 11:19 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Matthew Dennis22-May-19 10:02
sysadminMatthew Dennis22-May-19 10:02 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Jammer22-May-19 12:30
Jammer22-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
David A. Gray23-May-19 6:36 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
DerekT-P23-May-19 0:22
professionalDerekT-P23-May-19 0:22 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 1:38
Gary Wheeler23-May-19 1:38 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
User 483504723-May-19 5:37
User 483504723-May-19 5:37 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 5:48
Gary Wheeler23-May-19 5:48 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
David A. Gray23-May-19 6:32
David A. Gray23-May-19 6:32 
GeneralRe: Blurring the Lines Between Interfaces and Abstract Classes Pin
Gary Wheeler23-May-19 8:10
Gary 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
mveOriginalGriff22-May-19 4:56 
GeneralRe: Thought of the Day Pin
W Balboos, GHB22-May-19 5:10
W Balboos, GHB22-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.