View Single Post
  #1 (permalink)  
Old 10-12-2007, 11:08 AM
one198 one198 is offline
Member
 
Join Date: Aug 2007
Posts: 15
one198 is on a distinguished road
Dear Friends

I wrote below coding for a learn the java.I wanna call play method inside the Sing method.but i got error message.How i do this.
Code:
public class Student{ public void Play(){ System.out.println("Child is playing"); } public void Sing(){ play(); System.out.println("Child is singing"); } } public class Test40 { public static void main(String[] args) { Student St1=new Student(); St1.Sing(); } }
Error message is

Test40.java7:cannot find symbol
symbol :method play()
location:class Student
play();


pls help me
Thank you

Last edited by one198 : 10-12-2007 at 02:37 PM.
Reply With Quote
Sponsored Links