Abstract class question

From: Passero (yanongena_at_pandora.be)
Date: 12/17/03


Date: Wed, 17 Dec 2003 10:21:11 GMT

I have a question where i can't seem to find the answer for:

An abstract class is a class where you can't make an instance from, that's
something i know but can an abstract class hold regular methods or does
every method needs to be declared abstract? If it is possible, can such a
method be declared static (in java).
The reasen because i ask this is because i've seen a way to make a
singelton: a class where you can hold maximum 1 instance but when you make
that class abstract and you make all the methods static, it would be easier
to implement i guess... Is this correct?



Relevant Pages

  • Re: Virtual Classes
    ... It doesn't *have* to be an abstract class just because it has a ... virtual method. ... >A class must be declared abstract if it contains at least one virtual ... >Do not confuse one with each other. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Using abstract class that implements interface
    ... Abstract class keep common part of internal implementation, ... colleges - that come from JAVA programming - says - it is redundant ... and interface is unnecessary... ... AbstractList is an abstract class that provides default implementations ...
    (comp.lang.java.programmer)
  • Object initialization question
    ... I am relatively new to Java and I have come across something that I ... I have the following abstract class and child class: ... protected abstract void verify(); ... public TestKey(){ ...
    (comp.lang.java.help)
  • Re: extending abstract class
    ... >public abstract class fileCommand { ... Java is case sensitive. ... fileCommand is an abstract class. ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.help)
  • Re: A way of passing functions as arguments in Java?
    ... written to meet a similar aim for a package in Java. ... In Java, everything is under some class (no global things such as ... other method, like a callback, you can make an abstract class with some ... common single method name, and select that as your parameter. ...
    (comp.programming)