--- kiran badi <[EMAIL PROTECTED]> wrote:

> 
> hi guys
> i have posted my few codes in java and i am not able
> to compile the programs.it shows some errors
> everytime.
>  
>  import java.io.*;
> class hello{
> public static void main(string args[])
> system.out.print("hello java");
> }
> shows that ; is expected dont know why.

You're missing the left bracket for main
  
> 2    mport public package java.lang
> import public package java.lang.math
> class SquareRoot
> {
>       public static void main(string args[])
>       {
>       double x=5;
>       double y;
>       y=math.sqrt(x);
>       system.out.println("y="+y);
>       }
> its shows indentifier expected and . expected

"math" is not a class. "Math" is. case sensitivity is
very important.

> 3.
> Import java.lang.
> Public class Employee extends java.lang
> {
>       string employeeName;
>       string employeeAddress;
>       public Employee()
>       {
>        employeeName="Carol";
>        employeeAddress="21 Rock st.";
>       }
>         public void DisplayDetails()
>       {
>        system.out.println("Name of an Employee
> is"+employeeName);
>        system.out.println("Address of an employee
> is"+employeeAddress);
>       }
>       public static void main(string args[])
>       {
>        Employee employeeObject=new Employee();
>        employeeObject.displayDetails();
>       }
> }

"string" is not a class. "String" is.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~-> 

If you have any comments or questions, submit it on the message board.
NO spam/ads/job posting or you will be BANNED from this group. Exception can be made 
it happen by notify me ahead of time.
all new members' message will be verified by me (spam..) before it get posted. 
Yahoo! Groups Links

<*> To reply to this message, go to:
    http://groups.yahoo.com/group/java_official/post?act=reply&messageNum=17247
    Please do not reply to this message via email. More information here:
    http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> To visit your group on the web, go to:  
    http://groups.yahoo.com/group/java_official/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to