compilation error

Ads
 

compilation error

i 'm not able to compile a program :
prblem is there is one package in which 2 class person & dog reside. both classes r public still i'm not able to make object of Dog clss in Person class!!
plezz help
View Answers

March 3, 2010 at 5:54 PM

Post your code.

March 5, 2010 at 5:11 PM

//this is person code!!
public class Person
{
private String name;
private int age;
private Dog dog;
public void setname(String name)
{
this.name=name;
}
public String getName()
{
return name;
}
public void setAge(int age)
{
this.age=age;
}
public int getAge()
{
return age;
}
public void setDog(Dog dog)
{
this.dog=dog;
}
public Dog getDog()
{
return dog;
}
}
//this is Dog code!!public class Dog
{
private String name;
private String breed;
public void setName(String name)
{
this.name=name;
}
public String getName()
{
return name;
}
public void setBreed(String breed)
{
this.breed=breed;
}
public String getBreed()
{
return breed;
}
}

these classes r in same package
Dog class is being compiled bt. Person is not compiled .
error is can't found Symbol Dog

Ads









Related Tutorials/Questions & Answers:
compilation error
compilation error  Hi my program below is not compiling,when I try to compile it i'm getting the error message "tool completed with exit code 1".The loop has to be at the end of the program can you help me. Blockquoteimport
compilation error - Java Beginners
compilation error  class s { public static void main(String ar[]) { int j=0834... this program it is giving an error as integer number is too large.why? and what
Advertisements
java compilation error - Hibernate
java compilation error  hi, i have made an registration page whosevalues should be inserted into database. i have used hibernate and eclipse it is working fine. but when i make a war file and deploy it using ant and then run
Java compilation error - Java Beginners
Java compilation error  Method overridden problems in compile time error
java compilation error - Java Beginners
java compilation error  i have downloaded java software(version 6 update 12) from www.java.com. whenever i try to compile the program using javac command, error message is displayed javac is not recognized as an internal
Java Compilation error. Hibernate code problem. Struts first example - Hibernate
Java Compilation error. Hibernate code problem. Struts first example  Java Compilation error. Hibernate code problem. Struts first example
program created and compilation error of connection rightly created n tested
program created and compilation error of connection rightly created n... error for connection on which other programs are running smoothly...:( import... ("there was some error in establishing connection : "+e); } sep
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
java Compilation
java program compilation time following error is occur in my system Note...:unchecked for details. 1 error so plz send me answer why this error is coming.... To avoid this error, specify the type of object you're storing in the collection. So
java Compilation
java program compilation time following error is occur in my system Note...:unchecked for details. 1 error so plz send me answer why this error is coming.... To avoid this error, specify the type of object you're storing in the collection. So
java Compilation
java program compilation time following error is occur in my system Note...:unchecked for details. 1 error so plz send me answer why this error is coming.... To avoid this error, specify the type of object you're storing in the collection. So
compilation fail
compilation fail  package jsptube.tutorials.servletexample; import javax.servlet.GenericServlet; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import java.io.IOException; import
compilation errors
compilation errors  package jsptube.tutorials.servletexample; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import
command prompt is compilation is not working
command prompt is compilation is not working   Dear java users can anyone help me to run the program in command line prompt i tried by selecting... helloworld through command prompt class not found error and class loader not able
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Java Compilation - Java Beginners
working directory, give an appropriate error message and terminate the program

Ads