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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.