Hi Kiran,
I have tried out all of your given programs, it's all working fine. Only you
need to take care or case sensitivity. I have modified your all programs
that I am writing here please compare it with your once. And you will see
that you are on a right way and just need to take care with sily mistakes.
One more thing there is no need to import java.lang package at every Java
program because this are the defalt package of java its already accessible.
public class Hello {
public static void main(String args[]){
System.out.println("Hello" + " " + "Java");
}
}
public class SquareRoot {
public static void main(String args[]){
double x=5;
double y;
y = Math.sqrt(x);
System.out.println("y = " + y);
}
}
public class Employee{
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();
}
}
I think this might help you,
S Patel
_____
From: kiran badi [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 1:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [Java] pls help me as i am begineer in java. aim using jdk1.4
on win2k p os and guys pls help me till am atleast ok in programming
hi patel
i tried ur suggestion but still i am findiong same error and its shows that
; is expected in System.out.println and this error i am finding in this
particular Statement only in most of programs in write.u thnk that i am
missing something.if yes pls tell me.even if put like this also i am getting
same error.
System.Out.Println
i have posted my code
import java.io.*;
class hello{
public static void main(string args[])
System.out.println("hello java","+");
}
Thanks fior help.
kiran
a.net> wrote:
Hi Kiran,
If you have write here as same as you are compiling the program then look at
'system.out.println' you should use 'System.out.println' as you may already
know Class name's first letter should in capital latter.
Hope this might help you,
S Patel
_____
From: kiran badi [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 9:17 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [Java] pls help me as i am begineer in java. aim using jdk1.4 on
win2k p os and guys pls help me till am atleast ok in programming
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.
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
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();
}
}
its shows class or interface expected dont know what is wrong.these are all
ex from tutorial books
pls giude as how to start inital programming as i am familar with systax
but still i feel thats only on paper as i am not able to do it in system.
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
[Non-text portions of this message have been removed]
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 Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129iu8n4r/M=294855.5468653.6549235.3001176/D=gr
oups/S=1705006905:HM/EXP=1098806089/A=2376776/R=0/SIG=11ldm1jvc/*http:/promo
tions.yahoo.com/ydomains2004/index.html> click here
<http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=
:HM/A=2376776/rand=344417264>
_____
Yahoo! Groups Links
* 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]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
[Non-text portions of this message have been removed]
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 SponsorADVERTISEMENT
---------------------------------
Yahoo! Groups Links
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 the Yahoo! Terms of Service.
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
[Non-text portions of this message have been removed]
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 Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129dhifug/M=295196.4901138.6071305.3001176/D=gr
oups/S=1705006905:HM/EXP=1098888858/A=2128215/R=0/SIG=10se96mf6/*http:/compa
nion.yahoo.com> click here
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=
:HM/A=2128215/rand=550854278>
_____
Yahoo! Groups Links
* 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]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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=17267
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/