getting identifier expected error . help me !
hi,
this is small program of adding two integers and storing in other integer.the program is not compiling .
public class additions{
private int a =5;
private int b=6 ;
private int c=9;
public void add(intm ,intn ) {
a=m;
b=n;
c=a+b;
System.out.println("value of summation is " +c);
}
public static void main(String []arg){
additions objadd = new additions() ;
objadd.add(7,8);
System.out.println("value of a before declared is.. " +objadd.a);
System.out.println("value of b before declared is .." +objadd.b);
System.out.println("value of c before declared is .." +objadd.c);
objadd.add(7,8);
System.out.println("final summtion result is " + objadd.c);
}
}
where is the error? tell me