Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java



error getting
C#
class.java:5: error: cannot find symbol
		this.s = g;


C#
class.java:6: error: cannot find symbol
		this.f = d;

i mean it weirdly it declaration is in there in class ?? right ?

What I have tried:

class Add{
// private int s;
// private int f;
public int a(int g,int d){
this.s = g;
this.f = d;
return g+d;
}
public void main(String[] args) {
Add d = new Add();
System.out.print(d.a(4,5));
}



}
Posted
Updated 19-Aug-16 10:49am

1 solution

Uncomment the class variables s and f (remove the leading //).
 
Share this answer
 
Comments
Papasani Mohansrinivas 19-Aug-16 23:36pm    
i don't get logic behind uncommenting the variables, what it has to do with this. concept ??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900