Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Creating Classes

  Asked By: Fern    Date: Sep 18    Category: Java    Views: 518

I'm trying to create a class called 'MyDate'. Does anyone have
an idea of how to do this. I tried to follow the instructions froma
tutorial, but I'm lost.



5 Answers Found

Answer #1    Answered By: Sherrie Thomas     Answered On: Sep 18

/* The MyDate class  implements an application that
* displays "Hello World!" to the standard output.
public class MyDate {
public static void main(String[] args) {
// Display "My Date!"
System.out.println("My Date!");

Answer #2    Answered By: Anselma Schmidt     Answered On: Sep 18

that is strange ... have you set the classpath and the path correctly ?
is your java file name is MyDate.java ?
dan what is the error that shown in your monitor ?

Answer #3    Answered By: Dang Tran     Answered On: Sep 18

It seems to me you are missing fundamental steps of
programming such as the pathway for system to
recognize your work not the system works, ie. import
or package statements. Unless you already defined on
top of the program which is not showing here.

Answer #4    Answered By: Jamie Roberts     Answered On: Sep 18

The problem is that when I go into DOS to run it, I can't find it. I
saved it as MyDate.java,but it can't find it. i'm not sure what i
did wrong.

Answer #5    Answered By: Flynn Jones     Answered On: Sep 18

The previous E-mail supposes to follow after this one.
You need to log in Sun Java source website and study
the create  system path according to your OS.

Didn't find what you were looking for? Find more on Creating Classes Or get search suggestion and latest updates.