What's the damn error in this program...
please identify error in this basic program
it's in SCJP directory
SFDR.java
-------------------------------------------------------------------------------------
Code :
package SCJP;
import java.lang.*;
public class SFDR
{
public static void main(String[] args)
{
System.out.println("this is a class following java code conventions");
}
}
--------------------------------------------------------------------------------------
Re: What's the damn error in this program...
What error are you receiving? Compile time? Run time? Please post the full message. You must take into consideration the package when dealing with the program from the command line (a guess based upon the info you provided), typically involves setting the directory to the parent relative to the package and working from there.
Re: What's the damn error in this program...
Well, since this is an exercise in following code conventions, you can find the official version here:
Code Conventions for the Java(TM) Programming Language: Contents
I see three deviations:
Uppercase package name (should be lowercase)
Unnecessary import of java.lang (imported by default)
Class name in all uppercase (should be first letter uppercase -- all upppercase is used for constants aka static final variables)
And of course the lack of any indenting, possibly arising out of your not using code tags.
db