i am new to java i hava saw error that illegal start of error in this program

public class double
{
public static void main(String[] args )
{
double d=1232.44;
System.out.println("the double value is :"+d);
}}

please help me

Recommended Answers

What was the full text of the error message?

You should not use ANY of Java's keywords or class names for the names of your classes or variables.

Jump to Post

All 3 Replies

What was the full text of the error message?

You should not use ANY of Java's keywords or class names for the names of your classes or variables.

yep ... double is a reserved keyword. that 'll propably be your fault.
just rename your file (and class) to something more suitable (and allowed) like DoubleApp

public class double
{
public static void main(String[] args )
{
double d=1232.44;
System.out.println("the double value is :"+d);
}}

you cannot use keywords lik NormR1 says

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.