Hi everybody,
I ahve 3 questions:
Q1) Is it necessary for all
Java classes to have atleast one constructor ?
Q2) Variables declared inside a method as final retain their value between invocations of the method in which they are defined. True or False
Q3) In the following code after which line does the variable var go out of scope ?
void func() {
for (int i=0; i<10; i++)
{
double var= i*3.2;
for(int j=0; j<10; j++) {
String s= String.valueOf(var*j);
System.out.println(s);
}
}
}
a) Line number 7
b) Line number 8
c) Line number 9