class Test {
public static void main(String[] args) {
m1();
}
static byte m1( ) {
final char c1 ='2';
return c1; //line 1
}
static byte m2(final char c2) {
c2='3';
return c2; //line 2
}
}
while i am compiling this code i am getting compiler error at line 2 only.i am not getting compiler error at line 1 why.please help anybody.
public static void main(String[] args) {
m1();
}
static byte m1( ) {
final char c1 ='2';
return c1; //line 1
}
static byte m2(final char c2) {
c2='3';
return c2; //line 2
}
}
while i am compiling this code i am getting compiler error at line 2 only.i am not getting compiler error at line 1 why.please help anybody.