A
Afri
Hi
Please excuse the novice question.
The class I am trying to work with is defined as:
public abstract class WctpFactory
extends java.lang.Object
WctpFactory contains the following method:
public java.lang.String getTimestamp()
This is my program:
import java.io.*;
import com.arch.wctp.*;
public class wctpTime
{
public void main( String args[] )
{
String tStamp = WctpFactory.getTimestamp();
}
}
Compiling this produces the following error message:
wctpTime.java:16: non-static method getTimestamp() cannot be
referenced from a static context
What am I doing wrong?
Thanks
afri
Please excuse the novice question.
The class I am trying to work with is defined as:
public abstract class WctpFactory
extends java.lang.Object
WctpFactory contains the following method:
public java.lang.String getTimestamp()
This is my program:
import java.io.*;
import com.arch.wctp.*;
public class wctpTime
{
public void main( String args[] )
{
String tStamp = WctpFactory.getTimestamp();
}
}
Compiling this produces the following error message:
wctpTime.java:16: non-static method getTimestamp() cannot be
referenced from a static context
What am I doing wrong?
Thanks
afri